[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Time counter?



~ :   [I am porting some libraries that works under Windows NT, 
~ :   Solaris, HPUX und AIX to OpenBSD]
~ :
~ :   I am looking for a function that returns a timer value that
~ :   won't be altered by 'settimeofday'. The problem is that I
~ :   want to block exactly ten seconds basically doing a poll
~ :   in a loop. But if the system clock is set back a day this loop
~ :   won't return for 24h (using the function 'gettimeofday').
~ :

We also have times(3) though it probably not really what you want.
 have alook on getitimer(2), also probably microtime(9) could be helpful
though I never used it.