net.sf.sensor.timer
Class TimerRuntime

java.lang.Object
  extended bynet.sf.sensor.timer.TimerRuntime

public class TimerRuntime
extends Object

Main entry point for working with Timers and TimerStatistics.

Author:
Age Mooy

Field Summary
static String DEFAULT_ROOT_TIMER_LABEL
           
 
Constructor Summary
TimerRuntime()
          todo get rid of this constructor
 
Method Summary
 Timer getTimer(String id)
          Creates a new Timer instance for the specified id and starts it.
 Timer getTimer(String id, String label)
          Creates a new Timer instance for the specified id and starts it.
 List getTimerStatistics()
          Returns a List<TimerStatistics> representing the statistics for all currently registered timers.
 void reset()
          Resets all data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ROOT_TIMER_LABEL

public static final String DEFAULT_ROOT_TIMER_LABEL
See Also:
Constant Field Values
Constructor Detail

TimerRuntime

public TimerRuntime()
todo get rid of this constructor

Method Detail

getTimer

public Timer getTimer(String id)
Creates a new Timer instance for the specified id and starts it.

Parameters:
id - an id to uniquely identify the Timer.
Returns:
the started Timer instance.

getTimer

public Timer getTimer(String id,
                      String label)
Creates a new Timer instance for the specified id and starts it.

Parameters:
id - an id to uniquely identify the Timer.
label - a label that will be associated with the Timer.
Returns:
the started Timer instance.

reset

public void reset()
Resets all data. This clears the entire set of data collected until now. Use with caution !!


getTimerStatistics

public List getTimerStatistics()
Returns a List<TimerStatistics> representing the statistics for all currently registered timers.

Returns:
a List<TimerStatistics> representing the statistics for all currently registered timers.


Copyright © 2005-2006 SourceForge. All Rights Reserved.