gethrvtime man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

gethrtime(3scl)						       gethrtime(3scl)

       gethrtime, gethrvtime - get high resolution time

       SCL Miscellaneous Library (, libsolmisc.a)

       #include <sys/time.h>

       hrtime_t gethrtime(void);

       hrtime_t gethrvtime(void);

       The  gethrtime()	 function  returns  the	 current value of real time in
       nanosecond units. The returned value is not necessarily	based  on  the
       actual  time  of day. The function can be used to measure the amount of
       real time elapsed between successive calls.

       The gethrvtime() function returns a value of accumulated CPU  (virtual)
       time  in	 nanosecond units for the current process. The children of the
       process are not accounted for. This value is only  returned  if	micro-
       state accounting is enabled with the ptime(1scl) utility.

       On  Solaris, the duration measured between successive gethrtime() func‐
       tion calls is not affected by changes  to  the  system  time.  The  SCL
       implementation  is  affected by this, therefore care should be taken to
       ensure that the clock is not  adjusted  when  applications  using  this
       function are executing, otherwise false measurements may occur.

       Although the returned value is in units of nanoseconds, the actual res‐
       olution of the value is hardware dependent. The returned time value  is
       guaranteed  to  be  monotonic  (it will not go backward or periodically
       wrap), but two successive calls to the function could return  the  same

       Both functions return a time value as a 64-bit signed integer.

       Command: ptime(1scl)

       Manual: Solaris Compatibility Library User's Guide


List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
Vote for polarhome
Free Shell Accounts :: the biggest list on the net