We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents cae88df + b2857c6 commit d18e9efCopy full SHA for d18e9ef
run.c
@@ -13,7 +13,6 @@ Then run with:
13
#include <time.h>
14
#include <math.h>
15
#include <string.h>
16
-#include <sys/time.h>
17
18
// ----------------------------------------------------------------------------
19
// Transformer and RunState structs, and related memory management
@@ -378,9 +377,9 @@ int argmax(float* v, int n) {
378
377
379
380
long time_in_ms() {
381
- struct timeval time;
382
- gettimeofday(&time, NULL);
383
- return time.tv_sec * 1000 + time.tv_usec / 1000;
+ struct timespec time;
+ timespec_get(&time, TIME_UTC);
+ return time.tv_sec * 1000 + time.tv_nsec / 1000000;
384
}
385
386
int main(int argc, char *argv[]) {
0 commit comments