프로그램 시간측정 (소켓포함)
/** * int clock_gettime(clockid_t clock_id, struct timespec *tp); * Description: clock_settime, clock_gettime, clock_getres - clock and timer functions (REALTIME) * need to compile option: -lrt (gcc -o test test.c -lrt) **/ #include main() { struct timespec tp; int ts; ts = clock_gettime(CLOCK_REALTIME, &tp); printf(“%ld %ld\n”, tp.tv_sec, tp.tv_nsec); ts = clock_gettime(CLOCK_REALTIME, &tp); pr..
Devolopment/C, C++
2015. 5. 29. 11:08
반응형
최근에 달린 댓글