12345678910111213141516171819202122232425262728293031323334 |
- // #ifdef __cplusplus
- // extern "C" {
- // #endif
- //========================================================================================================================================================================================================200
- // DEFINE/INCLUDE
- //========================================================================================================================================================================================================200
- #include <stdlib.h>
- #include <sys/time.h>
- #include "timer.h"
- //========================================================================================================================================================================================================200
- // GET TIME
- //========================================================================================================================================================================================================200
- // Returns the current system time in microseconds
- long long
- get_time() {
- struct timeval tv;
- gettimeofday(&tv, NULL);
- return (tv.tv_sec * 1000000) + tv.tv_usec;
- }
- //========================================================================================================================================================================================================200
- // END
- //========================================================================================================================================================================================================200
- // #ifdef __cplusplus
- // }
- // #endif
|