Admin Production ni-theme
Current Publication

time

LabWindows/CVI

time

time_t time (time_t *currentCalendarTime);

Purpose

Determines the current calendar time. The result is stored in the specified output variable and is also returned by the function. The value that is returned is the number of seconds since January 1, 1900 Coordinated Universal Time (UTC), formerly known as Greenwich Mean Time (GMT). You can pass this value to the localtime function to obtain the time for your time zone. You can then pass the structure pointer returned by localtime to either asctime or strftime to obtain an ASCII string representation of the time. time returns -1 if the current calendar time is not available.

Parameters

Output
Name Type Description
currentCalendarTime time_t The variable entered is assigned the value of the current calendar time. The function returns -1 if the current calendar time is not available.

Return Value

Name Type Description
returnedCalendarTime time_t Contains the returned current calendar time. The function returns -1 if the current calendar time is not available.

Additional Information

Library: ANSI C Library

Include file: ansi_c.h

LabWindows/CVI compatibility: LabWindows/CVI 3.0 and later

Example

Refer to analysis\parsevls.cws for an example of using the time function.