12345678910111213141516171819202122232425 |
- #include <sys/time.h>
- #include <stdio.h>
- #include <stdlib.h>
- #include <unistd.h>
- #include <time.h>
- int main()
- {
- struct timeval *tv = malloc(sizeof(struct timeval));
-
-
-
-
-
-
-
-
-
-
- gettimeofday(tv, NULL);
- printf("tv = %ld.%06ld\n", tv->tv_sec, tv->tv_usec);
-
- return 0;
- }
|