cz.cuni.amis.pogamut.sposh.engine.timer
Class DebugTimer

Package class diagram package DebugTimer
java.lang.Object
  extended by cz.cuni.amis.pogamut.sposh.engine.timer.DebugTimer
All Implemented Interfaces:
ITimer

public class DebugTimer
extends Object
implements ITimer

Timer what allows me to skip forward in time or suspend time for a while. Very useful for tests or debugging.

Author:
Honza

Constructor Summary
DebugTimer()
           
 
Method Summary
 void addTime(long time2add)
           
 long getTime()
           
 void init()
          Initialize timer, e.g.
 boolean isSuspended()
          Is the timer suspended?
 void resume()
          Resume suspended timer
 void suspend()
          Suspend timer, until resume() is called, stop the clock.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugTimer

public DebugTimer()
Method Detail

init

public void init()
Description copied from interface: ITimer
Initialize timer, e.g. synchronize it with system closk or anything.

Specified by:
init in interface ITimer

suspend

public void suspend()
Description copied from interface: ITimer
Suspend timer, until resume() is called, stop the clock.

Specified by:
suspend in interface ITimer

isSuspended

public boolean isSuspended()
Description copied from interface: ITimer
Is the timer suspended?

Specified by:
isSuspended in interface ITimer

resume

public void resume()
Description copied from interface: ITimer
Resume suspended timer

Specified by:
resume in interface ITimer

addTime

public void addTime(long time2add)

getTime

public long getTime()
Specified by:
getTime in interface ITimer
Returns:
time


Copyright © 2014 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.