< prev index next >
hotspot/src/os/linux/vm/os_linux.cpp
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1999, 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) 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 1320,1329 ****
--- 1320,1338 ----
int status = gettimeofday(&time, NULL);
assert(status != -1, "linux error");
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
void os::Linux::clock_init() {
< prev index next >