networkdelta.c (228714) | networkdelta.c (246209) |
---|---|
1/*- 2 * Copyright (c) 1985, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 * SUCH DAMAGE. 28 */ 29 30#ifndef lint 31#if 0 32static char sccsid[] = "@(#)networkdelta.c 8.1 (Berkeley) 6/6/93"; 33#endif 34static const char rcsid[] = | 1/*- 2 * Copyright (c) 1985, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 18 unchanged lines hidden (view full) --- 27 * SUCH DAMAGE. 28 */ 29 30#ifndef lint 31#if 0 32static char sccsid[] = "@(#)networkdelta.c 8.1 (Berkeley) 6/6/93"; 33#endif 34static const char rcsid[] = |
35 "$FreeBSD: head/usr.sbin/timed/timed/networkdelta.c 228714 2011-12-19 18:08:31Z dim $"; | 35 "$FreeBSD: head/usr.sbin/timed/timed/networkdelta.c 246209 2013-02-01 14:26:54Z charnier $"; |
36#endif /* not lint */ 37 38#include "globals.h" 39 40static long median(float, float *, long *, long *, unsigned int); 41 42/* 43 * Compute a corrected date. --- 13 unchanged lines hidden (view full) --- 57 * The original BSD implementation would chose the clock of the 58 * most common model, and discard all others. 59 * 60 * Therefore, get best we can do is to try to average over all 61 * of the machines in the network, while discarding "obviously" 62 * bad values. 63 */ 64long | 36#endif /* not lint */ 37 38#include "globals.h" 39 40static long median(float, float *, long *, long *, unsigned int); 41 42/* 43 * Compute a corrected date. --- 13 unchanged lines hidden (view full) --- 57 * The original BSD implementation would chose the clock of the 58 * most common model, and discard all others. 59 * 60 * Therefore, get best we can do is to try to average over all 61 * of the machines in the network, while discarding "obviously" 62 * bad values. 63 */ 64long |
65networkdelta() | 65networkdelta(void) |
66{ 67 struct hosttbl *htp; 68 long med; 69 long lodelta, hidelta; 70 long logood, higood; 71 long x[NHOSTS]; 72 long *xp; 73 int numdelta; --- 187 unchanged lines hidden --- | 66{ 67 struct hosttbl *htp; 68 long med; 69 long lodelta, hidelta; 70 long logood, higood; 71 long x[NHOSTS]; 72 long *xp; 73 int numdelta; --- 187 unchanged lines hidden --- |