X-Git-Url: http://git.hungrycats.org/cgi-bin/gitweb.cgi?p=xscreensaver;a=blobdiff_plain;f=hacks%2Fwhirlwindwarp.c;h=e643b28d1b7eab8a757fd189454c0ef27a744cb3;hp=843a1cfbbcf4f4e1a419183ac8cff2502a8ff16b;hb=d5186197bc394e10a4402f7f6d23fbb14103bc50;hpb=6afd6db0ae9396cd7ff897ade597cd5483f49b0e diff --git a/hacks/whirlwindwarp.c b/hacks/whirlwindwarp.c index 843a1cfb..e643b28d 100644 --- a/hacks/whirlwindwarp.c +++ b/hacks/whirlwindwarp.c @@ -447,7 +447,8 @@ whirlwindwarp_draw (Display *dpy, Window window, void *closure) struct timeval now; long timediff; gettimeofday(&now, NULL); - timediff = now.tv_sec*1000000 + now.tv_usec - st->lastframe.tv_sec*1000000 - st->lastframe.tv_usec; + /* timediff = now.tv_sec*1000000 + now.tv_usec - st->lastframe.tv_sec*1000000 - st->lastframe.tv_usec; */ + timediff = (now.tv_sec - st->lastframe.tv_sec) * 1000000 + now.tv_usec - st->lastframe.tv_usec; if (timediff < utimeperframe) { /* fprintf(stderr,"sleeping for %i\n",utimeperframe-timediff); */ this_delay = (utimeperframe-timediff);