_Jv_platform_nanotime
Andrew Haley
aph@redhat.com
Mon Sep 4 15:42:00 GMT 2006
Dude, how may nanoseconds in a second? :-)
Andrew.
2006-09-04 Andrew Haley <aph@redhat.com>
* posix.cc (_Jv_platform_nanotime): Correct scale factor.
Index: libjava/posix.cc
===================================================================
--- libjava/posix.cc (revision 116634)
+++ libjava/posix.cc (working copy)
@@ -87,12 +87,12 @@ _Jv_platform_nanotime ()
if (clock_gettime (id, &now) == 0)
{
jlong result = (jlong) now.tv_sec;
- result = result * 1000 * 1000 + now.tv_nsec;
+ result = result * 1000 * 1000 * 1000 + now.tv_nsec;
return result;
}
// clock_gettime failed, but we can fall through.
#endif // HAVE_CLOCK_GETTIME
- return _Jv_platform_gettimeofday () * 1000LL;
+ return _Jv_platform_gettimeofday () * 1000LL * 1000LL;
}
// Platform-specific VM initialization.
More information about the Java-patches
mailing list