Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bobboau on October 28, 2003, 11:53:07 pm
-
I was just playing around with something for some reason and I needed to get the current time in milliseconds so I could get a floating point frame time, time.h/time() gives me seconds, were is the function for milliseconds, I have tryed google and it hasn't provided anything usful and I need to get to sleep.
that should have been OT, I do so need sleep
-
To be honest Bob, my memory of STL is a little hazy. However, if memory serves, the time class may not be helpful, as all it measures time in seconds. As for more general programming help, I'm afraid I'm not of much use.
-
Thread title edited. ;)
-
If it only needs to work in Windows, I believe the easiest way is to use timeGetTime(), look it up from MSDN (http://msdn.microsoft.com/library/default.asp)
-
clock() - milliseconds since beginning of this thread
only really usefull for time differences that need high accuracy
-
Kazan, clock() returns the tick count. You'd have to multiply with 1000/CLK_TCK to get milliseconds.
-
are there stl grapics ruteens
-
GetTickCount() is a standard windows API function that returns the number of milliseconds since the computer has been turned on