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:
1313#include <time.h>
1414#include <math.h>
1515#include <string.h>
16- #include <sys/time.h>
1716
1817// ----------------------------------------------------------------------------
1918// Transformer and RunState structs, and related memory management
@@ -378,9 +377,9 @@ int argmax(float* v, int n) {
378377// ----------------------------------------------------------------------------
379378
380379long 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 ;
384383}
385384
386385int main (int argc , char * argv []) {
You can’t perform that action at this time.
0 commit comments