utils.h 451 B

1234567891011121314151617181920212223242526272829
  1. #ifndef __UTILS_H__
  2. #define __UTILS_H__
  3. #include <stdio.h>
  4. #include <unistd.h>
  5. #include <sys/time.h>
  6. /**
  7. * Calculate a duration
  8. *
  9. * @param start start of the computing or null if
  10. * this is the first time this function is inoked
  11. *
  12. * @return current time
  13. */
  14. struct timeval* showTime(struct timeval* start);
  15. /**
  16. * Switch to real-time mode
  17. */
  18. void scheduler_realtime();
  19. /**
  20. * Exit from real-time mode
  21. */
  22. void scheduler_standard();
  23. #endif