timer.h 757 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. /******************************************************************
  2. *
  3. * uEcho for C
  4. *
  5. * Copyright (C) Satoshi Konno 2015
  6. *
  7. * This is licensed under BSD-style license, see file COPYING.
  8. *
  9. ******************************************************************/
  10. #ifndef _UECHO_UTIL_TIME_H_
  11. #define _UECHO_UTIL_TIME_H_
  12. #include <uecho/typedef.h>
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. /****************************************
  17. * Function
  18. ****************************************/
  19. float uecho_random(void);
  20. void uecho_wait(clock_t mtime);
  21. void uecho_waitrandom(clock_t mtime);
  22. #define uecho_sleep(val) uecho_wait(val)
  23. #define uecho_sleeprandom(val) uecho_waitrandom(val)
  24. clock_t uecho_getcurrentsystemtime(void);
  25. #ifdef __cplusplus
  26. }
  27. #endif
  28. #endif