hotspot/src/os/linux/vm/os_linux.cpp
changeset 28737 ca4b6a6e5cc8
parent 28172 19ae5c844e75
child 29193 3ede621e9262
--- a/hotspot/src/os/linux/vm/os_linux.cpp	Wed Jan 28 09:27:49 2015 +0100
+++ b/hotspot/src/os/linux/vm/os_linux.cpp	Wed Jan 28 17:52:48 2015 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -1322,6 +1322,15 @@
   return jlong(time.tv_sec) * 1000  +  jlong(time.tv_usec / 1000);
 }
 
+void os::javaTimeSystemUTC(jlong &seconds, jlong &nanos) {
+  timeval time;
+  int status = gettimeofday(&time, NULL);
+  assert(status != -1, "linux error");
+  seconds = jlong(time.tv_sec);
+  nanos = jlong(time.tv_usec) * 1000;
+}
+
+
 #ifndef CLOCK_MONOTONIC
   #define CLOCK_MONOTONIC (1)
 #endif