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

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

public class SystemClockTimer
extends Object
implements ITimer

Simple timer that has same time as Calendar. Can't be suspended or resumed.

Author:
Honza

Constructor Summary
SystemClockTimer()
           
 
Method Summary
 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

SystemClockTimer

public SystemClockTimer()
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

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.