Skip to main content
gamedev.net
🔒 Locked

Simple Cross Platform Timer

Started by Donuts Jul 15, 2003 at 8:13 AM 1 replies 250+ views
Original Post
Donuts
Donuts
Is there a way to create a simple timer that can be used on a like any platform. I just need one that can calculate time to about a 1/4 of a second. Any help is appreciated.
drslush
drslush
There is no cross-platform way to do timing, they are all platform specific. However, you could do some conditional compilation with platform specific timers.
Jan Wassenberg
Jan Wassenberg
1) clock() - ISO C
2) clock_gettime() - POSIX, realtime extension
E8 17 00 42 CE DC D2 DC E4 EA C4 40 CA DA C2 D8 CC 40 CA D0 E8 40E0 CA CA 96 5B B0 16 50 D7 D4 02 B2 02 86 E2 CD 21 58 48 79 F2 C3

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.