Admin Production ni-theme
Current Publication

GetSystemTime

LabWindows/CVI

GetSystemTime

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

Purpose

Gets the system time in numeric format.

(Linux) This function is not supported.

Caution  The Windows SDK also contains a function with the same name. Include windows.h before including utility.h to ensure that there are no compilation errors as a result of this naming conflict. Define the SDK_CONFLICT_PRIORITYSDK_CONFLICT_PRIORITY macro to force LabWindows/CVI to use the Windows SDK implementation of this function.

Parameters

Output
Name Type Description
hours int The hours component of the time.

Values: 0 to 23
minutes int The minutes component of the time.

Values: 0 to 59
seconds int The seconds component of the time.

Values: 0 to 59

Return Value

Name Type Description
result int The result of the call.

Code Description
0 Success.
-1 Operating system reported failure.

Additional Information

Library: Utility Library

Include file: utility.h

LabWindows/CVI compatibility: LabWindows/CVI 4.0 and later

Examples

Refer to the following examples that use the GetSystemTime function:

  • analysis\parsevls.cws

    Open example
  • userint\colview.cws

    Open example