< prev index next >
hotspot/src/os/solaris/vm/os_solaris.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1997, 2014, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 1997, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 1473,1482 ****
--- 1473,1492 ----
fatal(err_msg("os::javaTimeMillis: gettimeofday (%s)", strerror(errno)));
}
return jlong(t.tv_sec) * 1000 + jlong(t.tv_usec) / 1000;
}
+ void os::javaTimeSystemUTC(jlong &seconds, jlong &nanos) {
+ timeval t;
+ if (gettimeofday(&t, NULL) == -1) {
+ fatal(err_msg("os::javaTimeSystemUTC: gettimeofday (%s)", strerror(errno)));
+ }
+ seconds = jlong(t.tv_sec);
+ nanos = jlong(t.tv_usec) * 1000;
+ }
+
+
jlong os::javaTimeNanos() {
return (jlong)getTimeNanos();
}
void os::javaTimeNanos_info(jvmtiTimerInfo *info_ptr) {
< prev index next >