Is there any simple, cross-platform method of getting time, accurate to milliseconds, in C?
I am working on a game (surprise surprise) and everything so far is platform independent, I would like to keep it that way. Is there any way to get time in milliseconds?
Thanks a bunch -- is gettimeofday() compatible with windows()? I code on linux, so I have no way of testing, but obviously I would like the program to run as seamlessly as possible on both OS's.
Thanks.
Thanks.
There is a way to get gettimeofday() to work on Windows. However, I've heard that gettimeofday() and ftime() aren't quite in-sync with Windows time, but time() is always accurate. Maybe give the link above a shot and see what comes out...?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement