#include <pthread.h>
int clock_gettime (int clock_id, struct timespec *tp);
int clock_gettime
The clock_gettime function gets the time from the given clock.
The clock_gettime function returns zero if successful and -1 otherwise.