8085975: Fix warning "converting to jlong from double" of gcc 4.1.2 after 8079561
Reviewed-by: mgerdin, ehelin
--- a/hotspot/src/share/vm/runtime/timer.cpp Mon Jun 08 17:39:35 2015 +0000
+++ b/hotspot/src/share/vm/runtime/timer.cpp Mon Jun 08 15:40:28 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
+ * 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
@@ -59,7 +59,7 @@
}
jlong elapsedTimer::milliseconds() const {
- return TimeHelper::counter_to_millis(_counter);
+ return (jlong)TimeHelper::counter_to_millis(_counter);
}
jlong elapsedTimer::active_ticks() const {
@@ -89,7 +89,7 @@
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);
+ return (jlong)TimeHelper::counter_to_millis(new_count - _counter);
}
jlong TimeStamp::ticks_since_update() const {