void test_mydifftime() { struct timeval begin, end; curtime(&begin); usleep(5); curtime(&end); printf("Time Diff:%llu\n", mydifftime(&begin, &end)); }
int main() { struct timeval t1, t2; gettimeofday(&t1, 0); usleep(3000); gettimeofday(&t2, 0); printf("%f\n", mydifftime(&t1, &t2)); return 0; }