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

Question about timing



I know this has been discussed recently, but I can't find it in my
archive: What is the preferred way to obtain precise time?

I have looked at the following calls:

a) time(2) gets time in seconds
b) gettimeofday(2) get time in seconds and microseconds
c) clock(3) get time in processor ticks

a) is not precise enough for me.
b) is precise enough - but is there a large overhead in using this?
c) is precise enough (I think) - but I am worried about portability and
   overrun. And, this is only for my process, correct?

So, have I overlooked some? What is your recommendations? 

Thanks,

Mads

-- 
Mads Bondo Dydensborg.                               madsdyd@challenge.dk
The Microsoft Dictionary

     security: Asks for a password. Example: Windows 95 has a high 
               level of security because it asks for a password.


---------------------------------------------------------------------
To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk