_gst_get_milli_time isn't working under windows

Project:GNU Smalltalk
Component:VM
Category:bug
Priority:normal
Assigned:Unassigned
Status:fixed
Description

Here is a working version:

uint64_t
_gst_get_milli_time (void)
{

 static mst_Boolean initialized = false;
 static double frequencyToMicroseconds = 0.0;
 static LARGE_INTEGER offset;

 LARGE_INTEGER counter;
 double microseconds;

 if (initialized == false)
   {
     LARGE_INTEGER performanceFrequence;
     initialized = true;
     QueryPerformanceFrequency (&performanceFrequence);
     QueryPerformanceCounter (&offset);
     frequencyToMicroseconds = (double)performanceFrequence.QuadPart / 1000000.;
   }

 QueryPerformanceCounter (&counter);
 counter.QuadPart = counter.QuadPart - offset.QuadPart;
 microseconds = (double)counter.QuadPart / frequencyToMicroseconds;
 return microseconds / 1000.;

}

Updates

#1 submitted by GwenaelCasaccio on Thu, 01/17/2013 - 16:26
Status:active» fixed

No more used in master

User login