< prev index next >
src/share/vm/runtime/timer.cpp
Print this page
rev 8477 : 8085975: Fix warning "converting to jlong from double" of gcc 4.1.2 after 8079561
*** 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.
*** 57,67 ****
double elapsedTimer::seconds() const {
return TimeHelper::counter_to_seconds(_counter);
}
jlong elapsedTimer::milliseconds() const {
! return TimeHelper::counter_to_millis(_counter);
}
jlong elapsedTimer::active_ticks() const {
if (!_active) {
return ticks();
--- 57,67 ----
double elapsedTimer::seconds() const {
return TimeHelper::counter_to_seconds(_counter);
}
jlong elapsedTimer::milliseconds() const {
! return (jlong)TimeHelper::counter_to_millis(_counter);
}
jlong elapsedTimer::active_ticks() const {
if (!_active) {
return ticks();
*** 87,97 ****
}
jlong TimeStamp::milliseconds() const {
assert(is_updated(), "must not be clear");
jlong new_count = os::elapsed_counter();
! return TimeHelper::counter_to_millis(new_count - _counter);
}
jlong TimeStamp::ticks_since_update() const {
assert(is_updated(), "must not be clear");
return os::elapsed_counter() - _counter;
--- 87,97 ----
}
jlong TimeStamp::milliseconds() const {
assert(is_updated(), "must not be clear");
jlong new_count = os::elapsed_counter();
! return (jlong)TimeHelper::counter_to_millis(new_count - _counter);
}
jlong TimeStamp::ticks_since_update() const {
assert(is_updated(), "must not be clear");
return os::elapsed_counter() - _counter;
< prev index next >