The clock_gettime function returns the current tp value for the specified clock, clock_id. On success, the function returns 0. On failure, the function returns -1 and sets errno to indicate the error. See also clock_getres, clock_settime, time, and ctime.