LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

GetSystemTime with accuracy at millis in LabWindows CVI?

In LabWindows /CVI 5.5 "C for Virtual Instrumentation" can I get
system time with accuracy at millisecond?

The function:

int status = GetSystemTime(int *hours, int *minutes, int *seconds);

is not good for me.

Can I use the Windows API:

VOID GetSystemTime(
LPSYSTEMTIME lpSystemTime // address of system time structure
);

inside my program write in C?

Thank You
0 Kudos
Message 1 of 2
(4,477 Views)
To use the API function GetSystemTime you must include windows.h in your project, then simply use it.

Example:

#include

void GetTime (void) {
SYSTEMTIME dh;

GetSystemTime(&dh); // Fills the structure
printf ("%d %d %d", dh.wDay, dh.wMonth, dh.wYear);

return;
}

Roberto


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 2 of 2
(4,477 Views)