comparison src/os/windows/vm/os_windows.cpp @ 62:cd0742ba123c

Merge
author kamg
date Thu, 20 Mar 2008 09:17:30 -0500
parents e195fe4c40c7 5a76ab815e34
children 82db0859acbe
comparison
equal deleted inserted replaced
52:75b0f3cb1943 62:cd0742ba123c
735 result.dwHighDateTime = high(a); 735 result.dwHighDateTime = high(a);
736 result.dwLowDateTime = low(a); 736 result.dwLowDateTime = low(a);
737 return result; 737 return result;
738 } 738 }
739 739
740 jlong os::timeofday() {
741 FILETIME wt;
742 GetSystemTimeAsFileTime(&wt);
743 return windows_to_java_time(wt);
744 }
745
746
747 // Must return millis since Jan 1 1970 for JVM_CurrentTimeMillis
748 // _use_global_time is only set if CacheTimeMillis is true
749 jlong os::javaTimeMillis() { 740 jlong os::javaTimeMillis() {
750 if (UseFakeTimers) { 741 if (UseFakeTimers) {
751 return fake_time++; 742 return fake_time++;
752 } else { 743 } else {
753 return (_use_global_time ? read_global_time() : timeofday()); 744 FILETIME wt;
745 GetSystemTimeAsFileTime(&wt);
746 return windows_to_java_time(wt);
754 } 747 }
755 } 748 }
756 749
757 #define NANOS_PER_SEC CONST64(1000000000) 750 #define NANOS_PER_SEC CONST64(1000000000)
758 #define NANOS_PER_MILLISEC 1000000 751 #define NANOS_PER_MILLISEC 1000000