I did a couple of quick experiments and it appears that on Solaris 7 x86
both gettimeofday() and gethrtime() return times that step by 10 ms.
I just tried the same experiment on Solaris 8 (on a different machine,
alas) and the times seem to increment by 1 ms or maybe even smaller.
Does anyone have experience with this on Solaris 7 or 8 and any insight
into whether Sun actually made changes in Solaris 8 on Intel to give
higher precision? I don't have any current vintage SPARC hardware to
try the same experiment (a 40 line C program).
BTW, it appears that you can mess with hires_tick in /etc/system (eg.
set it to 1 for ms resolution), but I've not tried that for fear of
burning up all my CPU time servicing clock interrupts.
There is an interesting white paper at
http://www.sun.com/software/white-papers/wp-realtime/, which briefly
mentions high precision timing, although the paper is fuzzy on the
changes for Solaris x86. It also implies that the gettimeofday() and
gethrtime() calls have the same precision as before, and that to get
higher precision one needs to use the CLOCK_HIGHRES timer (only as
What I noticed is that Solaris 8 x86 appears to have higher precision
out of the box and I'd like to see somewhere written down (I believe
everything I read!) stating that clearly. I'm not sure it is dependent
upon actual CPU (PIII vs PII vs Celeron for example), but if so, I'd
like to know the particular CPU required.
Sent via Deja.com http://www.deja.com/
Before you buy.