A 64-bit integer type representing the number of seconds since the epoch (00:00:00 UTC, January 1, 1970). Used for systems requiring extended date ranges beyond the limitations of 32-bit `time_t`.
A pointer to a `time64_t` object, used to store or retrieve 64-bit timestamps. Commonly passed to functions handling 64-bit time values, allowing indirect modification.
1st Parameter
Pointer to a `time64_t` object where the current time will be stored. If this is `NULL`, the current time is not stored but is still returned by the function.
Read more about parameters of time64 in parameters section
The time64function in C language Gets the current calendar time as a 64-bit value, suitable for representing times beyond 2038.
The time64 function returns the current calendar time as a __time64_t value, which is a 64-bit representation of the number of seconds elapsed since the Epoch (00:00:00 UTC, January 1, 1970). This allows for representing dates well beyond the year 2038, avoiding the 'Year 2038 problem' associated with 32-bit time_t values.
The time64function takes 1
parameter:
•
time64_t * `timer`: Pointer to a `time64_t` object where the current time will be stored. If this is `NULL`, the current time is not stored but is still returned by the function.
Returns the current time as a 64-bit integer representing the number of seconds since the epoch (00:00:00 UTC, January 1, 1970). This function is typically used for systems requiring extended time ranges beyond the traditional 32-bit `time_t`. If `timer` is not `NULL`, the result is also stored in the object pointed to by `timer`. Returns `(time64_t)(-1)` if the current time is not available.
The time64 function return value :
Returns the current calendar time as a __time64_t value, or -1 if the time is not available
Output
This example gets the current time using the 64-bit function and prints it as a long long integer.