Re: Equivalent to gethrtime()
Re: Equivalent to gethrtime()
- Subject: Re: Equivalent to gethrtime()
- From: Malte Tancred <email@hidden>
- Date: Wed, 28 Nov 2001 15:58:01 +0100
No, I need something very similar to that Solaris function. Trying
to port some software that need a high resolution counter. The
software can work with "...Pentium RDTSC tick counter or the
Solaris gethrtime() nanosecond counter."
So, something similar to either the gethrtime() on Solaris or the
Pentium tick counter available in Mac OS X?
Snip from the man page:
...
DESCRIPTION
The gethrtime() function returns the current high-resolution
real time.
...
NOTES
Although the units of hi-res time are always the same
(nanoseconds), the actual resolution is hardware dependent.
Hi-res time is guaranteed to be monotonic (it won't go back-
ward, it won't periodically wrap) and linear (it won't occa-
sionally speed up or slow down for adjustment, like the time
of day can), but not necessarily unique: two sufficiently
proximate calls may return the same value.
...
Thanks,
Malte
Raphael Sebbe wrote:
I don't know about nanosec counter, but you can have microsec accuracy
using gettimeofday(...)
Raphael
On Wednesday, November 28, 2001, at 03:04 PM, Malte Tancred wrote:
Hi!
Is there a Mac OS X equivalent to the gethrtime() nanosecond counter
found on Solaris?
Cheerio,
Malte
--
Malte Tancred
Computer programmer, Oops AB, Sweden
mailto:email@hidden
http://www.oops.se/
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev