cgl.narada.service.timer
Class ClockI

java.lang.Object
  extended by cgl.narada.service.timer.ClockI
Direct Known Subclasses:
HRClock, JavaClock, UnixClock, WindowsClock

public abstract class ClockI
extends Object

This class provides an interface for Windows and Unix (Linux, Solaris) based clock implementations. It exposes two methods: getTimeMicroseconds and getTimeMilliseconds.

Version:
1.0

Field Summary
protected  long currentTimeMicros
           
protected  long currentTimeMillis
           
protected  GlobalServiceProperties globalServiceProperties
           
protected  String OSArch
           
protected  String OSName
           
protected  ServicePropertiesFactory servicePropertiesFactory
           
 
Constructor Summary
ClockI()
           
 
Method Summary
abstract  long getTimeMicroseconds()
          Returns time in microseconds
abstract  long getTimeMilliseconds()
          Returns time in milliseconds
abstract  void sleep(int sleepVal)
          Causes thread to sleep for the specified amount in milliseconds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OSName

protected String OSName

OSArch

protected String OSArch

currentTimeMillis

protected long currentTimeMillis

currentTimeMicros

protected long currentTimeMicros

servicePropertiesFactory

protected ServicePropertiesFactory servicePropertiesFactory

globalServiceProperties

protected GlobalServiceProperties globalServiceProperties
Constructor Detail

ClockI

public ClockI()
Method Detail

getTimeMicroseconds

public abstract long getTimeMicroseconds()
Returns time in microseconds

Returns:
long - local time as microseconds

getTimeMilliseconds

public abstract long getTimeMilliseconds()
Returns time in milliseconds

Returns:
long - local time as milliseconds

sleep

public abstract void sleep(int sleepVal)
Causes thread to sleep for the specified amount in milliseconds.

Parameters:
sleepVal - - sleep time in milliseconds


For comments and suggestions please send e-mail to The NaradaBrokering Project