Unified · Split
| @@ -63,6 +63,7 @@ struct Img { · 62 unmodified lines | |||
| 63 | u8int bgrx[]; | 63 | u8int bgrx[]; |
| 64 | }; | 64 | }; |
| 65 | 65 | ||
| 66 | static uvlong nframes, tstart, debug; | ||
| 66 | static int opt; | 67 | static int opt; |
| 67 | 68 | ||
| 68 | #pragma varargck type "ℏ" int | 69 | #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 | ||
| 319 | static uvlong nframes, tstart, debug; | ||
| 320 | |||
| 321 | static int | 320 | static int |
| 322 | done(void *, char *msg) | 321 | done(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) |