🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Timer

Started by
4 comments, last by Null and Void 16 years, 9 months ago
Hello, I just started to do some more advanced stuff under Linux, and maybe someone could point me in right direction. What I want is to have a high resolution timer. Right now I'm using "ftime" calls to calculate time, but it gives me resolution to 1/1000 sec. Does someone know a way to have higher resolution timer under Linux? Regards...
Advertisement
I know the gstreamer library internally works on nanoseconds, so at least it's possible. I don't know of any standard library that supplies these high resolution timers though.

<hr />
Sander Marechal<small>[Lone Wolves][Hearts for GNOME][E-mail][Forum FAQ]</small>

The gettimeofday function will give you a timeval structure. That structure can be accurate down to microseconds, but i am not sure if gettimeofday is that accurate.
This question is in the FAQ.
Thanks for all responses, I will try them in the evening.
Quote: Original post by Null and Void
This question is in the FAQ.

Sorry for that, I missed that one :(
Quote: Original post by Zabbas
Sorry for that, I missed that one :(

No worries; I'm probably the only person who knew an answer was in there :p.

This topic is closed to new replies.

Advertisement