[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Question about timing
- To: Linux Games <linuxgames@sunsite.auc.dk>
- Subject: Question about timing
- From: Mads Bondo Dydensborg <madsdyd@challenge.dk>
- Date: Fri, 7 Apr 2000 10:39:02 +0200 (CEST)
- Delivered-To: mailing list linuxgames@sunsite.auc.dk
- Delivery-Date: Fri, 07 Apr 2000 04:39:32 -0400
- Mailing-List: contact linuxgames-help@sunsite.auc.dk; run by ezmlm
- Reply-To: linuxgames@sunsite.auc.dk
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