< prev index next >

src/hotspot/share/services/management.cpp

Print this page
@@ -2092,10 +2092,16 @@
    assert(os::elapsed_frequency() > 0, "Must be non-zero");
    return (jlong)(((double)ticks / (double)os::elapsed_frequency())
                   * (double)1000.0);
  }
  
+ jlong Management::ticks_to_us(jlong ticks) {
+   assert(os::elapsed_frequency() > 0, "Must be non-zero");
+   return (jlong)(((double)ticks / (double)os::elapsed_frequency())
+                  * (double)1000000.0);
+ }
+ 
  // Gets the amount of memory allocated on the Java heap since JVM launch.
  JVM_ENTRY(jlong, jmm_GetTotalThreadAllocatedMemory(JNIEnv *env))
      // A thread increments exited_allocated_bytes in ThreadService::remove_thread
      // only after it removes itself from the threads list, and once a TLH is
      // created, no thread it references can remove itself from the threads
< prev index next >