clock_gettime() vs. gettimeofday()?
Aug. 1, 2006
6:25 p.m.
This has probably been discussed before, however ... Is there any reason to use clock_gettime() in preference to gettimeofday() if it exists? It pretends to at least return seconds + nanoseconds, where gettimeofday() returns seconds + microseconds. Are there perhaps some platforms where it's possible to actually get more useful bits? On my Solaris 10/Intel desktop box clock_getres shows 0.01s resolution (not obviously better) while on a Linux box here it shows 0.001s resolution. Is that better than what gettimeofday() does? Skip
7044
Age (days ago)
7044
Last active (days ago)
0 comments
1 participants
participants (1)
-
skip@pobox.com