8085975: Fix warning "converting to jlong from double" of gcc 4.1.2 after 8079561
authorgoetz
Mon, 08 Jun 2015 15:40:28 +0200
changeset 31334 d55c96b36b5f
parent 31333 12ccf8b26eb0
child 31335 60081f497e75
child 31336 897c602148d9
child 31338 84aec4406e60
child 31340 2f9ff278bb13
8085975: Fix warning "converting to jlong from double" of gcc 4.1.2 after 8079561 Reviewed-by: mgerdin, ehelin
hotspot/src/share/vm/runtime/timer.cpp
--- 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 {