time.ch
Declarations
Parameters
- arg - pointer to a time_t object where the time will be stored, or a null pointer @return Current calendar time encoded as time_t object on success, (time_t)(-1) on error. If arg is not a null pointer, the return value is also stored in the object pointed to by arg. @see https:en.cppreference.com/w/c/chrono/time
Returns
Current calendar time encoded as time_t object on success, (time_t)(-1) on error. If arg is not a null pointer, the return value is also stored in the object pointed to by arg. @see https:en.cppreference.com/w/c/chrono/time
See Also
- https:en.cppreference.com/w/c/chrono/time
Returns
Processor time used by the program so far or (clock_t)(-1) if that information is unavailable or its value cannot be represented. @see https:en.cppreference.com/w/c/chrono/clock
See Also
- https:en.cppreference.com/w/c/chrono/clock
Parameters
- ts - pointer to an object of type struct timespec @param base - TIME_UTC or another nonzero integer value indicating the time base @return The value of base if successful, zero otherwise. @see https:en.cppreference.com/w/c/chrono/timespec_get
- base - TIME_UTC or another nonzero integer value indicating the time base @return The value of base if successful, zero otherwise. @see https:en.cppreference.com/w/c/chrono/timespec_get
Returns
The value of base if successful, zero otherwise. @see https:en.cppreference.com/w/c/chrono/timespec_get
See Also
- https:en.cppreference.com/w/c/chrono/timespec_get
Parameters
- ts - pointer to an object of type struct timespec @param base - TIME_UTC or another nonzero integer value indicating the time base @return The value of base if base is supported, zero otherwise. @see https:en.cppreference.com/w/c/chrono/timespec_getres
- base - TIME_UTC or another nonzero integer value indicating the time base @return The value of base if base is supported, zero otherwise. @see https:en.cppreference.com/w/c/chrono/timespec_getres
Returns
The value of base if base is supported, zero otherwise. @see https:en.cppreference.com/w/c/chrono/timespec_getres
See Also
- https:en.cppreference.com/w/c/chrono/timespec_getres
Parameters
- str - pointer to the first element of the char array for output @param count - maximum number of bytes to write @param format - pointer to a null-terminated multibyte character string specifying the format of conversion @param tp - pointer to a struct tm object specifying the time to format @return The number of bytes written into the character array pointed to by str not including the terminating '\0' on success. If count was reached before the entire string could be stored, 0 is returned and the contents are indeterminate. @see https:en.cppreference.com/w/c/chrono/strftime
- count - maximum number of bytes to write @param format - pointer to a null-terminated multibyte character string specifying the format of conversion @param tp - pointer to a struct tm object specifying the time to format @return The number of bytes written into the character array pointed to by str not including the terminating '\0' on success. If count was reached before the entire string could be stored, 0 is returned and the contents are indeterminate. @see https:en.cppreference.com/w/c/chrono/strftime
- format - pointer to a null-terminated multibyte character string specifying the format of conversion @param tp - pointer to a struct tm object specifying the time to format @return The number of bytes written into the character array pointed to by str not including the terminating '\0' on success. If count was reached before the entire string could be stored, 0 is returned and the contents are indeterminate. @see https:en.cppreference.com/w/c/chrono/strftime
- tp - pointer to a struct tm object specifying the time to format @return The number of bytes written into the character array pointed to by str not including the terminating '\0' on success. If count was reached before the entire string could be stored, 0 is returned and the contents are indeterminate. @see https:en.cppreference.com/w/c/chrono/strftime
Returns
The number of bytes written into the character array pointed to by str not including the terminating '\0' on success. If count was reached before the entire string could be stored, 0 is returned and the contents are indeterminate. @see https:en.cppreference.com/w/c/chrono/strftime
See Also
- https:en.cppreference.com/w/c/chrono/strftime
Parameters
- timer - pointer to a time_t object to convert @return pointer to a static internal tm object on success, or null pointer otherwise. The structure may be shared between gmtime, localtime, and ctime and may be overwritten on each invocation. @see https:en.cppreference.com/w/c/chrono/gmtime
Returns
pointer to a static internal tm object on success, or null pointer otherwise. The structure may be shared between gmtime, localtime, and ctime and may be overwritten on each invocation. @see https:en.cppreference.com/w/c/chrono/gmtime
See Also
- https:en.cppreference.com/w/c/chrono/gmtime
Parameters
- timer - pointer to a time_t object to convert @param buf - pointer to a struct tm object to store the result @return copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to UTC). @see https:en.cppreference.com/w/c/chrono/gmtime
- buf - pointer to a struct tm object to store the result @return copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to UTC). @see https:en.cppreference.com/w/c/chrono/gmtime
Returns
copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to UTC). @see https:en.cppreference.com/w/c/chrono/gmtime
See Also
- https:en.cppreference.com/w/c/chrono/gmtime
Parameters
- timer - pointer to a time_t object to convert @param buf - pointer to a struct tm object to store the result @return copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to UTC). @see https:en.cppreference.com/w/c/chrono/gmtime
- buf - pointer to a struct tm object to store the result @return copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to UTC). @see https:en.cppreference.com/w/c/chrono/gmtime
Returns
copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to UTC). @see https:en.cppreference.com/w/c/chrono/gmtime
See Also
- https:en.cppreference.com/w/c/chrono/gmtime
Parameters
- timer - pointer to a time_t object to convert @param buf - pointer to a struct tm object to store the result @return pointer to a static internal tm object on success, or null pointer otherwise. The structure may be shared between gmtime, localtime, and ctime and may be overwritten on each invocation. @see https:en.cppreference.com/w/c/chrono/localtime
- buf - pointer to a struct tm object to store the result @return pointer to a static internal tm object on success, or null pointer otherwise. The structure may be shared between gmtime, localtime, and ctime and may be overwritten on each invocation. @see https:en.cppreference.com/w/c/chrono/localtime
Returns
pointer to a static internal tm object on success, or null pointer otherwise. The structure may be shared between gmtime, localtime, and ctime and may be overwritten on each invocation. @see https:en.cppreference.com/w/c/chrono/localtime
See Also
- https:en.cppreference.com/w/c/chrono/localtime
Parameters
- timer - pointer to a time_t object to convert @param buf - pointer to a struct tm object to store the result @return copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to local calendar time). @see https:en.cppreference.com/w/c/chrono/localtime
- buf - pointer to a struct tm object to store the result @return copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to local calendar time). @see https:en.cppreference.com/w/c/chrono/localtime
Returns
copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to local calendar time). @see https:en.cppreference.com/w/c/chrono/localtime
See Also
- https:en.cppreference.com/w/c/chrono/localtime
Parameters
- timer - pointer to a time_t object to convert @param buf - pointer to a struct tm object to store the result @return copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to local calendar time). @see https:en.cppreference.com/w/c/chrono/localtime
- buf - pointer to a struct tm object to store the result @return copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to local calendar time). @see https:en.cppreference.com/w/c/chrono/localtime
Returns
copy of the buf pointer, or null pointer on error (which may be a runtime constraint violation or a failure to convert the specified time to local calendar time). @see https:en.cppreference.com/w/c/chrono/localtime
See Also
- https:en.cppreference.com/w/c/chrono/localtime
Parameters
- arg - pointer to a tm object specifying local calendar time to convert @return time since epoch as a time_t object on success, or -1 if arg cannot be represented as a time_t object (POSIX also requires EOVERFLOW to be stored in errno in this case). @see time since epoch as a time_t object on success, or -1 if arg cannot be represented as a time_t object (POSIX also requires EOVERFLOW to be stored in errno in this case).
Returns
time since epoch as a time_t object on success, or -1 if arg cannot be represented as a time_t object (POSIX also requires EOVERFLOW to be stored in errno in this case). @see time since epoch as a time_t object on success, or -1 if arg cannot be represented as a time_t object (POSIX also requires EOVERFLOW to be stored in errno in this case).
See Also
- time since epoch as a time_t object on success, or -1 if arg cannot be represented as a time_t object (POSIX also requires EOVERFLOW to be stored in errno in this case).
Parameters
Returns
Difference between two times in seconds. @see Difference between two times in seconds.
See Also