Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

time, time64 - Get current time

&pagelevel(4)&pagelevel

Definition

#include <time.h>

time_t time(time_t *sec_p);
time64_t time64(time64_t *sec_p);

time and time64 return the current time (local time) as the number of seconds that have elapsed since the reference date (epoch).

By default, the reference date is always 1/1/1970 00:00:00.

When converting to summertime/wintertime, the value jumps by 3600 or -3600 seconds.

From 01/19/2038 03:14:08 time will issue the message CCM0014 and terminates the program.

time64 will supply correct results up to 3/18/4317 02:44:48.

Parameters

time_t *sec_p
time64_t *sec_p

Pointer to the result returned by time.

If a NULL pointer is passed as an argument, this parameter has no significance.

If no NULL pointer is passed, the result of time or time64 is additionally entered into the area to which sec_p points.

Return val.

Number of seconds that have elapsed since the reference date.

See also

ctime, ctime64, difftime, difftime64, ftime, ftime64, mktime, mktime64