struct timeval for Sys V Rel 3.0 ?
Eric Gisin
egisin at watmath.waterloo.edu
Fri May 13 05:17:11 AEST 1988
In article <7871 at brl-smoke.ARPA>, gwyn at brl-smoke.ARPA (Doug Gwyn ) writes:
> You can't get time like that from a normal UNIX system, even a Berkeley
> one. Apart from the uncertainties introduced by time-sharing scheduling,
> most implementations don't even maintain internal time that accurately.
> 100Hz clock is typical. Use time() instead.
On Vaxen running BSD gettimeofday reads a hardware clock register
with microsecond accuracy. Look at the timings from ping(8),
they have better resolution that the 100Hz software clock.
On System V, the best resolution you can get is the long (clock_t)
value returned by times(2). The resolution is on the order of 10 milliseconds.
More information about the Comp.unix.wizards
mailing list