changeset 8532:8207729d4dff

8085975: Fix warning "converting to jlong from double" of gcc 4.1.2 after 8079561 Reviewed-by: mgerdin, ehelin
author goetz
date Mon, 08 Jun 2015 15:40:28 +0200
parents b28271afc952
children cf5a0377f578 0e505de1dff4 fd32da92f8b9 4c6832d5feff
files src/share/vm/runtime/timer.cpp
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/runtime/timer.cpp	Mon Jun 08 17:39:35 2015 +0000
+++ b/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 {