File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -13,7 +13,6 @@ Then run with:
13
13
#include <time.h>
14
14
#include <math.h>
15
15
#include <string.h>
16
- #include <sys/time.h>
17
16
18
17
// ----------------------------------------------------------------------------
19
18
// Transformer and RunState structs, and related memory management
@@ -378,9 +377,9 @@ int argmax(float* v, int n) {
378
377
// ----------------------------------------------------------------------------
379
378
380
379
long time_in_ms () {
381
- struct timeval time ;
382
- gettimeofday (& time , NULL );
383
- return time .tv_sec * 1000 + time .tv_usec / 1000 ;
380
+ struct timespec time ;
381
+ timespec_get (& time , TIME_UTC );
382
+ return time .tv_sec * 1000 + time .tv_nsec / 1000000 ;
384
383
}
385
384
386
385
int main (int argc , char * argv []) {
You can’t perform that action at this time.
0 commit comments