[bug] _gst_get_milli_time isn't working under windows

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[bug] _gst_get_milli_time isn't working under windows

Gwenaël Casaccio
Issue status update for
http://smalltalk.gnu.org/node/689
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/689

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  GwenaelCasaccio
 Updated by:   GwenaelCasaccio
 Status:       active

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.;
}



_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: [bug] _gst_get_milli_time isn't working under windows

Gwenaël Casaccio
Issue status update for
http://smalltalk.gnu.org/project/issue/689
Post a follow up:
http://smalltalk.gnu.org/project/comments/add/689

 Project:      GNU Smalltalk
 Version:      <none>
 Component:    VM
 Category:     bug reports
 Priority:     normal
 Assigned to:  Unassigned
 Reported by:  GwenaelCasaccio
 Updated by:   GwenaelCasaccio
-Status:       active
+Status:       fixed

No more used in master



_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk