Example #1
0
File: test.c Project: kapop/lincore
void test_mydifftime()
{
    struct timeval begin, end;

    curtime(&begin);
    usleep(5);
    curtime(&end);
    printf("Time Diff:%llu\n", mydifftime(&begin, &end));
}
Example #2
0
int main()

{
	struct timeval t1, t2;

	gettimeofday(&t1, 0);
	usleep(3000);
	gettimeofday(&t2, 0);
	printf("%f\n", mydifftime(&t1, &t2));
	return 0;
}