This commit is contained in:
Vladimir Kozlov 2015-02-26 10:56:54 -08:00
commit 239370b736
1382 changed files with 52370 additions and 23387 deletions

View file

@ -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
@ -1324,6 +1324,15 @@ jlong os::javaTimeMillis() {
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