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
63 u8int bgrx[];63 u8int bgrx[];
64};64};
65 65
66static uvlong nframes, tstart, debug;
66static int opt;67static int opt;
67 68
68#pragma varargck type "ℏ" int69#pragma varargck type "ℏ" int
@@ -304,7 +305,7 @@ imgread(int f, int w, int h) · 235 unmodified lines
304 return nil;305 return nil;
305 }306 }
306 }307 }
307 i->ns = npe_nanosec();308 i->ns = tstart + npe_nanosec();
308 309
309 return i;310 return i;
310}311}
@@ -316,8 +317,6 @@ usage(void) · 5 unmodified lines
316 threadexitsall("usage");317 threadexitsall("usage");
317}318}
318 319
319static uvlong nframes, tstart, debug;
320
321static int320static int
322done(void *, char *msg)321done(void *, char *msg)
323{322{
@@ -465,7 +464,7 @@ main(int argc, char **argv) · 141 unmodified lines
465 Bflush(&h->out);464 Bflush(&h->out);
466 }465 }
467 466
468 tstart = npe_nanosec();467 tstart = nsec() - npe_nanosec();
469 for(nframes = 0;; nframes++){468 for(nframes = 0;; nframes++){
470 fstart = npe_nanosec();469 fstart = npe_nanosec();
471 if((img = imgread(in, ww, hh)) == nil)470 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