[glut-directfb] When converting microseconds to milliseconds, round to the next integer.
authorClaudio Ciccani <klan@directfb.org>
Fri, 8 Feb 2008 11:03:53 +0000 (12:03 +0100)
committerClaudio Ciccani <klan@directfb.org>
Fri, 8 Feb 2008 11:03:53 +0000 (12:03 +0100)
src/glut/directfb/callback.c

index 4f23441167ae24626d75481bfc055cc08f3ec780..7c9768aac0adcab7fced6e00f7765f8480b5a55f 100644 (file)
@@ -278,7 +278,7 @@ __glutGetTimeout( int *ret_msec )
      gettimeofday( &now, NULL );
      
      *ret_msec = (time->tv_sec  - now.tv_sec) * 1000 +
-                 (time->tv_usec - now.tv_usec + 500) / 1000;
+                 (time->tv_usec - now.tv_usec + 999) / 1000;
                  
      return GL_TRUE;
 }