Blob
1 #include <u.h>2 #include <libc.h>3 #include <draw.h>4 #include <memdraw.h>6 extern int drawdebug;7 void8 main(int argc, char **argv)9 {10 char cc;11 Memimage *x;12 Point c = {208,871};13 int a = 441;14 int b = 441;15 int thick = 0;16 Point sp = {0,0};17 int alpha = 51;18 int phi = 3;19 vlong t0, t1;20 int i, n;21 vlong del;23 memimageinit();25 x = allocmemimage(Rect(0,0,1000,1000), CMAP8);26 n = atoi(argv[1]);28 t0 = nsec();29 t0 = nsec();30 t0 = nsec();31 t1 = nsec();32 del = t1-t0;33 t0 = nsec();34 for(i=0; i<n; i++)35 memarc(x, c, a, b, thick, memblack, sp, alpha, phi, SoverD);36 t1 = nsec();37 print("%lld %lld\n", t1-t0-del, del);38 }40 int drawdebug = 0;42 void43 rdb(void)44 {45 }47 int48 iprint(char *fmt, ...)49 {50 int n;51 va_list va;52 char buf[1024];54 va_start(va, fmt);55 n = doprint(buf, buf+sizeof buf, fmt, va) - buf;56 va_end(va);58 write(1,buf,n);59 return 1;60 }