diff -r cf127be65014 -r 0ce0ac68ace7 src/hotspot/share/runtime/timer.cpp --- a/src/hotspot/share/runtime/timer.cpp Sat Nov 11 01:21:09 2017 +0100 +++ b/src/hotspot/share/runtime/timer.cpp Thu Aug 31 10:00:28 2017 +0200 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2017, 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 @@ -37,6 +37,11 @@ return counter_to_seconds(counter) * 1000.0; } +jlong TimeHelper::millis_to_counter(jlong millis) { + jlong freq = os::elapsed_frequency() / MILLIUNITS; + return millis * freq; +} + elapsedTimer::elapsedTimer(jlong time, jlong timeUnitsPerSecond) { _active = false; jlong osTimeUnitsPerSecond = os::elapsed_frequency();