#include <stdio.h>
#include <sys/time.h>
struct timeval start;
struct timeval end;
int main()
{
int timeuse;
gettimeofday(&start,NULL);
usleep(100);
gettimeofday(&end,NULL);
timeuse = 1000000*(end.tv_sec - start.tv_sec) + end.tv_usec - start. tv_usec;
printf("timeuse=%d/n",timeuse);
return 0;
}