DS
clock_gettime() for those unixs which have this realtime extensionQuote:> What facilities are available in unix to get number of elased time in
> nanoseconds?
--
Andrew Gabriel
> > What facilities are available in unix to get number of elased time in
> > nanoseconds?
> What UNIX on what processor?
> DS
> Solaris 7 (sparc)
elseQuote:}
DSQuote:}
> http://www.opengroup.org/onlinepubs/007908799/xsh/clock_getres.html
> DS
DS
multiplication by 1.0E9?Quote:> What facilities are available in unix to get number of elased time in
> nanoseconds?
(sorry, couldn't resist...)
> > > What facilities are available in unix to get number of elased time in
> > > nanoseconds?
> > What UNIX on what processor?
> > DS
--
Norman Black
Stony Brook Software
nospam => stonybrk
Quote:> What facilities are available in unix to get number of elased time in
> nanoseconds?
DS
DS
I'm curious, how did you reach this conclusion?
In the past I have called gettimeofday 1001 times (computing 1000 delta's).
It was a while ago and I'm going from memory, but I think I found the min delta
was 1 msec.
--
Communications Research Centre / RNS Tel (613) 998-2845
3701 Carling Ave., Fax (613) 998-9648
Ottawa, Ontario
K2H 8S2
Canada
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
There are many different implementations but the one SunOS 4.x/5.x one
on SPARC hardware has returned an number of microseconds derived from a
timer chip such that it gave a better resolution than 10ms.
(Similarly on Intel)
On a US-II 450MHz the typical granularity is 225ns (i.e., on five consecutive
calls, 3 deltas will be 0 and one will be 1)
On US-III based systems, the granularity appears to be 200ns and not 1ns.
On early BSD based systems, each lock tick would increment the time
with 10000us; however, multiple consecutive calls would get a difference
of 1 until the next clock tick so timestamps are uniq.
Modern systems are too fast for that.
Casper
--
Expressed in this posting are my opinions. They are in no way related
to opinions held by my employer, Sun Microsystems.
Statements on Sun products included here are not gospel and may
be fiction rather than truth.
1. Support for micro/nanosecond [acm]time in the NFS client
2. Best setting for ATI 3DRageIIc Agp
3. how to measure running time in nanosecond?
5. convert UT time in local time / local time in UT time
6. 2.5.33: Modifiable timeout in sr_packet
7. time time time how can I tell the time
9. fix compile breakage in fs/ after nanosecond stat timefields patch
10. Reiserfs broken in 2.5.50 (possibly nanosecond stat timefields?)
11. Nanosecond resolution for stat(2)
12. PATCH: add framework for ndelay (nanoseconds)
13. New nanosecond stat patch for 2.5.44