LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Relate the PC time to the GetTickCount value

Is there any way to relate the PC time received from TimeStr() to the GetTickCount value to get an exact time (according to the PC) down to the millisecond?
0 Kudos
Message 1 of 2
(3,056 Views)

If you want PC time in msec try this.

#include "windows.h" 

 int mon, day, year;
  int hour, min, sec, msec;
  SYSTEMTIME sdktime; 
 
 GetLocalTime (&sdktime);
 
 mon = sdktime.wMonth;
 day = sdktime.wDay;
 year = sdktime.wYear;
 hour = sdktime.wHour;
 min = sdktime.wMinute;
 sec = sdktime.wSecond;
 msec = sdktime.wMilliseconds;

Thanks.
CVI 2010
LabVIEW 2011 SP1
Vision Builder AI 2011 SP1
0 Kudos
Message 2 of 2
(3,031 Views)