Accuracy of Millisecs()

BlitzMax Forums/BlitzMax Programming/Accuracy of Millisecs()

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Wrong, calculating the number of cycles per millisecond is easy:
int64 timethen = GetMachineCycleCount();
Sleep(1);
int64 timenow = GetMachineCycleCount();
int64 one_millisecond = timenow - timethen;
float one_nanosecond =  (float)((float)one_millisecond / (float)1000); // It's gonna be 1 cycle for 1 GHz