diff options
author | Ollivier Robert <roberto@FreeBSD.org> | 2002-10-29 20:11:45 +0000 |
---|---|---|
committer | Ollivier Robert <roberto@FreeBSD.org> | 2002-10-29 20:11:45 +0000 |
commit | dab0d8338297872e7912cd449078972639a9ed90 (patch) | |
tree | 6d78967ca2441be4e1df21e747e3daf168ecd19e /contrib/ntp/scripts/calc_tickadj | |
parent | 8fe9403f63c99f62985f105d50e06032153e0611 (diff) | |
download | src-dab0d8338297872e7912cd449078972639a9ed90.tar.gz src-dab0d8338297872e7912cd449078972639a9ed90.zip |
This commit was generated by cvs2svn to compensate for changes in r106167,
which included commits to RCS files with non-trunk default branches.
Notes
Notes:
svn path=/head/; revision=106168
Diffstat (limited to 'contrib/ntp/scripts/calc_tickadj')
-rw-r--r-- | contrib/ntp/scripts/calc_tickadj | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/contrib/ntp/scripts/calc_tickadj b/contrib/ntp/scripts/calc_tickadj deleted file mode 100644 index f7a9f9f1d799..000000000000 --- a/contrib/ntp/scripts/calc_tickadj +++ /dev/null @@ -1,38 +0,0 @@ -#! /usr/local/bin/perl -# -# drift of 104.8576 -> +1 tick. Base of 10000 ticks. -# -# 970306 HMS Deal with nanoseconds. Fix sign of adjustments. - -$df="/etc/ntp.drift"; -# Assumes a 100Hz box with "tick" of 10000 -# Someday, we might call "tickadj" for better values... -$base=10000; # tick: 1,000,000 / HZ -$cvt=104.8576; # 2 ** 20 / $base -$v1=0.; -$v2=""; - -if (open(DF, $df)) - { - if ($_=<DF>) - { - ($v1, $v2) = split; - } - - while ($v1 < 0) - { - $v1 += $cvt; - $base--; - } - - while ($v1 > $cvt) - { - $v1 -= $cvt; - $base++; - } - } - -printf("%.3f (drift)\n", $v1); - -printf("%d usec; %d nsec\n", $base, ($base + ($v1/$cvt)) * 1000); - |