| Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | #include <stdlib.h> | 
|  | 2 | #include <sys/time.h> | 
|  | 3 |  | 
|  | 4 | unsigned long long os_usecs(void) | 
|  | 5 | { | 
|  | 6 | struct timeval tv; | 
|  | 7 |  | 
|  | 8 | gettimeofday(&tv, NULL); | 
|  | 9 | return((unsigned long long) tv.tv_sec * 1000000 + tv.tv_usec); | 
|  | 10 | } | 
|  | 11 |  | 
|  | 12 | /* | 
|  | 13 | * Overrides for Emacs so that we follow Linus's tabbing style. | 
|  | 14 | * Emacs will notice this stuff at the end of the file and automatically | 
|  | 15 | * adjust the settings for this buffer only.  This must remain at the end | 
|  | 16 | * of the file. | 
|  | 17 | * --------------------------------------------------------------------------- | 
|  | 18 | * Local variables: | 
|  | 19 | * c-file-style: "linux" | 
|  | 20 | * End: | 
|  | 21 | */ |