tests/flip_test: don't complain about timestamps in the future
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 2 Oct 2012 14:09:00 +0000 (16:09 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 2 Oct 2012 14:09:00 +0000 (16:09 +0200)
those can happen due to the scanline vblank timestamp adjuster ...

tests/flip_test.c

index d8abb71..8fd6ac6 100644 (file)
@@ -161,7 +161,7 @@ static void page_flip_handler(int fd, unsigned int frame, unsigned int sec,
 
        timersub(&pageflip_ts, &now, &diff);
 
-       if (diff.tv_sec > 0 || diff.tv_usec > 2000) {
+       if (diff.tv_sec > 0 || (diff.tv_sec > 0 && diff.tv_usec > 2000)) {
                fprintf(stderr, "pageflip timestamp delayed for too long: %is, %iusec\n",
                        (int) diff.tv_sec, (int) diff.tv_usec);
                exit(5);