Occurrences of gettimeofday() in src/usr.sbin
- usr.sbin/amd/include/config.h
- Define that FreeBSD implements the
gettimeofday(2)
system call.
- usr.sbin/arp/arp.c
- Used for setting expiry time of temporary arp table additions.
- usr.sbin/config/SMM.doc/2.t
- Document use of timezone definition in the kernel.
- usr.sbin/config/SMM.doc/4.t
- Document use of timezone definition in the kernel.
- usr.sbin/config/SMM.doc/spell.ok
- Dictionary listing.
- usr.sbin/cron/crontab/crontab.c
- Update the modification time of a cron spool directory, so
that the cron daemon can detect modifications.**
- usr.sbin/i4b/isdnd/timer.c
-
- usr.sbin/inetd/inetd.c
-
-
main():
Used to calculate rate of daemon spawning to prevent
Denial of Service from daemons spawning too quickly. The calculation
is in forks per second, and is not year related.
-
machtime()
: Generate a machine-readable time in seconds since
midnight, Jan 1, 1900. Since Unix time is in seconds since midnight,
Jan 1, 1970, 70 years of seconds (2,208,988,800) is added to the
value returned by gettimeofday(2)
. The value is reported as 4 bytes
in network order.
- usr.sbin/keyserv/keyserv.c
- Used twice in random number generation.
- usr.sbin/moused/moused.c
- Used to determine time intervals in mouse events.
- usr.sbin/mrouted/main.c
-
- The current time in seconds is used as a generation id.
- The current time is used to determine event periods
in seconds.
- usr.sbin/mrouted/mrinfo.c
- Determine timeout interval for waiting for responses.
- usr.sbin/mrouted/mtrace.c
- Calculate response delays in seconds and microseconds.
- usr.sbin/mrouted/prune.c
- Used in
accept_mtrace()
to timestamp request using network time
(seconds since 1900) adjusted to include fractional seconds.
- usr.sbin/pppd/auth.c
- Check account expiry time for authentication. Comparison is in
seconds.
- usr.sbin/pppd/magic.c
- Random number seeding.
- usr.sbin/pppd/main.c
- Used for setting and checking timeouts.
- usr.sbin/pw/pw_user.c
- Randomize the salt for MD5 password hashing.
- usr.sbin/rpc.lockd/procs.c
- Check for client expiry times.
- usr.sbin/rpc.yppasswdd/yppasswdd_server.c
- Compare timestamps on NIS passwd file copies XXX better explanation
wanted.
- usr.sbin/tcpdump/tcpslice/tcpslice.c
- Calculate current local timezone correction
in seconds deviation from UTC.
- usr.sbin/timed/timed/candidate.c
- Calculate 3 second waiting period for a response from the network.
- usr.sbin/timed/timed/correct.c
- Calculate the deviation from correct time for a slave machine.
Calculation is in seconds and usec.
- usr.sbin/timed/timed/master.c
-
- Calculate polling time and sample intervals for conversing with slaves.
- Adjust time for residence in a queue.
- Check the response time of slaves.
- Schedule sending of an ack to a slave.
- Delay sending time to slaves until confident of accuracy.
- usr.sbin/timed/timed/measure.c
-
- Set timeout.
- Calculate time difference between machines' clocks by using
ICMP timestamp messages.
- usr.sbin/timed/timed/readmsg.c
-
- Set timeout.
- Note arrival time of message from another machine.
- usr.sbin/timed/timed/slave.c
-
- Set timeouts.
- Timestamp time changes received from master.
- usr.sbin/timed/timed/timed.c
-
- Random seed generation.
- Obtain current date/time and return a date string formatted by
ctime()
function.
- usr.sbin/timed/timedc/cmds.c
- Compute the difference between this machine's time and that of another.
- usr.sbin/xntpd/authstuff/authspeed.c
- Compute the time taken to calculate authentication and encryption.
- usr.sbin/xntpd/clockstuff/chutest.c
- Calculate intervals in seconds and usec, for testing.
- usr.sbin/xntpd/clockstuff/clktest.c
- Calculate intervals in seconds and usec, for testing.
- usr.sbin/xntpd/doc/README.irig
- Information about IRIG time signal.
- usr.sbin/xntpd/doc/README.kern
- Information about
gettimeofday()
call in
various OS flavours.
- usr.sbin/xntpd/include/l_stdlib.h
- Function prototype declarations.
- usr.sbin/xntpd/include/ntp_unixtime.h
- Compatibility definition for SysV and BSD.
- usr.sbin/xntpd/kernel/README.kern
- Information about
gettimeofday()
call in
various OS flavours.
- usr.sbin/xntpd/lib/machines.c
- Replacement
gettimeofday()
code for machines
which don't have the call natively.
- usr.sbin/xntpd/parse/util/dcfd.c
- Measure signal intervals. This file is currently broken for
leap years (fix in pipeline).
- usr.sbin/xntpd/parse/util/testdcf.c
- Used in monitoring 50 Hz pulses from DCF clock. The result from
the DCF clock is printed in YY format, because that is what
the clock sends.
- usr.sbin/xntpd/scripts/monitoring/ntploopstat
- Timestamp status log lines. Uses
localtime()
and prints 4 digit year, compliant to 2038.
- usr.sbin/xntpd/util/README
- Documentation about jitter.c.
- usr.sbin/xntpd/util/jitter.c
- Calculate jitter of
gettimeofday()
call.
- usr.sbin/xntpd/util/precision.c
- Calculate precision of
gettimeofday()
call.
- usr.sbin/xntpd/xntpd/ntp_proto.c
- Calculate precision of
gettimeofday()
call.
- usr.sbin/xntpd/xntpd/refclock_gpstm.c
- Compare timestamp on GPS time packet with current system time.
- usr.sbin/xntpd/xntpd/refclock_parse.c
- Timeout reading from PARSE reference clock.
- usr.sbin/ypbind/yp_ping.c
- Timeout replies to client status request.
- usr.sbin/zic/Theory
- Document that
gettimeofday()
is not used.