org.objectweb.proactive.calcium.statistics
Class Timer

java.lang.Object
  extended by org.objectweb.proactive.calcium.statistics.Timer
All Implemented Interfaces:
java.io.Serializable

public class Timer
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
Timer()
           
Timer(boolean useCPUTime)
           
 
Method Summary
 int getNumberOfActivatedTimes()
           
 long getTime()
           
 void resume()
          After the timer has been stoped, this method can resume the counter.
 void start()
          Starts the current timer.
 long stop()
          Stops the current timer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Timer

public Timer(boolean useCPUTime)

Timer

public Timer()
Method Detail

start

public void start()
Starts the current timer. This method resets the timer state.


stop

public long stop()
Stops the current timer.

Returns:
Accumulated elapsed time.

resume

public void resume()
After the timer has been stoped, this method can resume the counter. The new time will be agregated to the previous time.


getTime

public long getTime()
Returns:
The currently accumulated time of this timer.

getNumberOfActivatedTimes

public int getNumberOfActivatedTimes()
Returns:
Number of times this timer wast activated: the number of times resume was called plus 1 (the inital start).


Copyright 2001-2007 INRIA All Rights Reserved.