You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Sun, 11 Mar 2018 at 09:39, stswandering ***@***.***> wrote:
In windows platform, GetSystemTimes function return double dword,high and
low.
At precent,using float:
#define LO_T ((float)1e-7)
#define HI_T (LO_T*4294967296.0)
idle = (float)((HI_T * idle_time.dwHighDateTime) + *
idle_time.dwLowDateTime));
for example:dwHighDateTime= 367519,dwLowDateTime=3192589922,returns
157848096.000000,
but in fact it was 1578480983281250.
the right way is to use __int64:
unsigned __int64 idle = idle_time.dwHighDateTime ;
idle <<= 32 ;
idle |= idle_time.dwLowDateTime ;
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1240>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAplLK79e9RggsOorGRQAeAaEQDhkqsTks5tdOKsgaJpZM4Slm6L>
.
In windows platform, GetSystemTimes function return double dword,high and low.
At precent,using float:
#define LO_T ((float)1e-7)
#define HI_T (LO_T*4294967296.0)
idle = (float)((HI_T * idle_time.dwHighDateTime) + * idle_time.dwLowDateTime));
for example:dwHighDateTime= 367519,dwLowDateTime=3192589922,returns 157848096.000000,
but in fact it was 1578480983281250.
the right way is to use __int64:
unsigned __int64 idle = idle_time.dwHighDateTime ;
idle <<= 32 ;
idle |= idle_time.dwLowDateTime ;
The text was updated successfully, but these errors were encountered: