Created
August 23, 2012 12:37
-
-
Save shaobohou/3436249 to your computer and use it in GitHub Desktop.
Clock test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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