Skip to content

Instantly share code, notes, and snippets.

@shaobohou
Created August 23, 2012 12:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shaobohou/3436249 to your computer and use it in GitHub Desktop.
Save shaobohou/3436249 to your computer and use it in GitHub Desktop.
Clock test
#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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment