rice.environment.time.simple
Class SimpleTimeSource
java.lang.Object
rice.environment.time.simple.SimpleTimeSource
- All Implemented Interfaces:
- Destructable, TimeSource
public class SimpleTimeSource
- extends Object
- implements TimeSource
Uses System.currentTimeMillis() to generate time.
- Author:
- Jeff Hoye
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleTimeSource
public SimpleTimeSource()
currentTimeMillis
public long currentTimeMillis()
- Returns the System.currentTimeMillis();
- Specified by:
currentTimeMillis in interface TimeSource
- Returns:
- the current time in millis
sleep
public void sleep(long delay)
throws InterruptedException
- Description copied from interface:
TimeSource
- block for this many millis
- Specified by:
sleep in interface TimeSource
- Parameters:
delay - the amount of time to sleep
- Throws:
InterruptedException
destroy
public void destroy()
- Specified by:
destroy in interface Destructable
Copyright © 2010. All Rights Reserved.