com.iphrase.runtime
Class Timer

java.lang.Object
  |
  +--com.iphrase.runtime.Timer

public class Timer
extends java.lang.Object

Timing utilities for measuring runtime performance.

Version:
1.0, Sep 14, 2004
Author:
cweikart

Inner Class Summary
static class Timer.Deserializer
          Thin wrapper around org.apache.axis.encoding.ser.BeanDeserializer that calls elapsed(long, java.lang.String) for the element deserialization operation.
 
Constructor Summary
Timer()
           
 
Method Summary
static void elapsed(long t0, java.lang.String op)
          Print elapsed time since t0 as well as other timing statistics along with the thread name setUniqueThreadName(), passed op, and additional adornments.
static long now()
          Get the time right now.
static void setUniqueThreadName()
          Set a unique per-thread name for use in subsequent calls to elapsed(long, java.lang.String).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Timer

public Timer()
Method Detail

setUniqueThreadName

public static void setUniqueThreadName()
Set a unique per-thread name for use in subsequent calls to elapsed(long, java.lang.String).

now

public static long now()
Get the time right now.

elapsed

public static void elapsed(long t0,
                           java.lang.String op)
Print elapsed time since t0 as well as other timing statistics along with the thread name setUniqueThreadName(), passed op, and additional adornments.
Parameters:
t0 - an earlier time in ms, typically obtained via a call to now() before the operation being timed
op - an operation name that distinguishes this call from others

© Copyright 2005, 2006. IBM Corporation. All rights reserved.