ref: d0c19101cf042a0c4e3e611fc606f32e1c4ae451
parent: b3f24a5c7b7b248c6cd8da6f4bd0b314b3660720
author: Sigrid Solveig Haflínudóttir <[email protected]>
date: Tue Aug 10 09:03:30 EDT 2021
start time from epoch
--- a/hj264.c
+++ b/hj264.c
@@ -63,6 +63,7 @@
u8int bgrx[];
};
+static uvlong nframes, tstart, debug;
static int opt;
#pragma varargck type "ℏ" int
@@ -304,7 +305,7 @@
return nil;
}
}
- i->ns = npe_nanosec();
+ i->ns = tstart + npe_nanosec();
return i;
}
@@ -316,8 +317,6 @@
threadexitsall("usage");
}
-static uvlong nframes, tstart, debug;
-
static int
done(void *, char *msg)
{
@@ -465,7 +464,7 @@
Bflush(&h->out);
}
- tstart = npe_nanosec();
+ tstart = nsec() - npe_nanosec();
for(nframes = 0;; nframes++){
fstart = npe_nanosec();
if((img = imgread(in, ww, hh)) == nil)