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