[lug] timers

D. Stimits stimits at idcomm.com
Fri Sep 29 00:41:56 MDT 2000


"D. Stimits" wrote:
> 
> I'm interested in creating a timer for low-accuracy, roughly millisecond
> resolutions (collecting statistics about some packet timings; the
> spacing of send attempts is important). This is not for real time, and
> is nowhere near that stressful, but on average they should be a
> reasonable representation. The time() function is far too low
> resolution, and the times() function displays in terms of clock ticks,
> not seconds or fractions of it. I'm not sure about the portability of
> times(), nor of how to calibrate it against a scale like milliseconds.
> Does anyone here have any suggestions of a simple or useful means of
> accomplishing this? Or of other man pages to look up, other than time()
> or times()?
> 
> Thanks,
> D. Stimits, stimits at idcomm.com

As often happens when asking questions, I answered my own question. I
found gettimeofday() returning microseconds :)




More information about the LUG mailing list