History

start time from epoch

Sigrid Solveig Haflínudóttir committed 5 years ago

Commit d0c19101 parent b3f24a51 file · +3 −4Browse files

Unified · Split

hj264.c+3−4
@@ -63,6 +63,7 @@ struct Img { · 62 unmodified lines
6363 u8int bgrx[];
6464 };
6565
66+static uvlong nframes, tstart, debug;
6667 static int opt;
6768
6869 #pragma varargck type "ℏ" int
@@ -304,7 +305,7 @@ imgread(int f, int w, int h) · 235 unmodified lines
304305 return nil;
305306 }
306307 }
307− i->ns = npe_nanosec();
308+ i->ns = tstart + npe_nanosec();
308309
309310 return i;
310311 }
@@ -316,8 +317,6 @@ usage(void) · 5 unmodified lines
316317 threadexitsall("usage");
317318 }
318319
319−static uvlong nframes, tstart, debug;
320−
321320 static int
322321 done(void *, char *msg)
323322 {
@@ -465,7 +464,7 @@ main(int argc, char **argv) · 141 unmodified lines
465464 Bflush(&h->out);
466465 }
467466
468− tstart = npe_nanosec();
467+ tstart = nsec() - npe_nanosec();
469468 for(nframes = 0;; nframes++){
470469 fstart = npe_nanosec();
471470 if((img = imgread(in, ww, hh)) == nil)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t