public
Created

Clock test

  • Download Gist
clocktest.cpp
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <time.h>
// #include <iostream>
// #include <errno.h>
 
int main()
{
struct timespec tp;
int status = clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp);
// int errsv = errno;
 
//std::cout << tp.tv_sec << " " << tp.tv_nsec << std::endl;
//if(errsv==EINVAL)
// std::cout << "EINVAL" << std::endl;
return status;
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.