/arch/um/os-Linux/time.c

https://bitbucket.org/evzijst/gittest · C · 21 lines · 8 code · 3 blank · 10 comment · 0 complexity · 721362568ddcf7c62afa5163519347e4 MD5 · raw file

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