* Copyright (c) 1983 Regents of the University of California.
* Redistribution and use in source and binary forms are permitted
* provided that the above copyright notice and this paragraph are
* duplicated in all such forms and that any documentation,
* advertising materials, and other materials related to such
* distribution and use acknowledge that the software was developed
* by the University of California, Berkeley. The name of the
* University may not be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
static char sccsid
[] = "@(#)networkdelta.c 2.3 (Berkeley) 6/18/88";
#include <protocols/timed.h>
* `networkdelta' selects the largest set of deltas that fall within the
* interval RANGE, and uses them to compute the network average delta
int i
, j
, maxind
, minind
;
for (i
=0; i
<slvcount
; i
++)
for (i
=0; i
<slvcount
-1; i
++) {
for (j
=i
+1; j
<slvcount
; j
++) {
/* this piece of code is critical: DO NOT TOUCH IT! */
i
=0; j
=1; minind
=0; maxind
=1;
if ((x
[j
]-x
[i
] <= RANGE
) && (j
-i
>= maxind
-minind
)) {
if ((x
[machup
-1] - x
[i
] <= RANGE
) && (machup
-i
-1 >= maxind
-minind
)) {
minind
=i
; maxind
=machup
-1;
ext
= maxind
- minind
+ 1;
for (i
=minind
; i
<=maxind
; i
++)