File size: 2,029 Bytes
5cb6c4b | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #ifdef __cplusplus
extern "C" {
#endif
//===============================================================================================================================================================================================================200
// TIMER CODE
//===============================================================================================================================================================================================================200
//======================================================================================================================================================150
// INCLUDE/DEFINE
//======================================================================================================================================================150
#include <stdlib.h>
//======================================================================================================================================================150
// FUNCTIONS
//======================================================================================================================================================150
//====================================================================================================100
// DISPLAY TIME
//====================================================================================================100
// 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 TIMER CODE
//===============================================================================================================================================================================================================200
#ifdef __cplusplus
}
#endif
|