#include #include #include #include size_t get_time(void) { size_t time; static size_t start_time = 0; struct timeval tv; gettimeofday(&tv, NULL); time = tv.tv_sec * 1000000 + tv.tv_usec; if (start_time == 0) start_time = time; return ((time - start_time) / 1000); }