cgl.narada.service.timer
Class HRClock

java.lang.Object
  extended by cgl.narada.service.timer.ClockI
      extended by cgl.narada.service.timer.HRClock

public class HRClock
extends ClockI

HRClock wrapps Windows and Unix implementations and returns the client either windows or unix implementation of the clock.

Version:
1.0

Field Summary
 
Fields inherited from class cgl.narada.service.timer.ClockI
currentTimeMicros, currentTimeMillis, globalServiceProperties, servicePropertiesFactory
 
Method Summary
static ClockI getClock()
          Returns clock implementation for the underlying operating system.
static ClockI getClock(String nbHome)
          Returns clock implementation for the underlying operating system.
static String getNBHome()
           
 long getTimeMicroseconds()
          Returns time in microseconds
 long getTimeMilliseconds()
          Returns time in milliseconds
static void main(String[] args)
          Simple test program.
 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
 

Method Detail

getClock

public static ClockI getClock()
Returns clock implementation for the underlying operating system.

Returns:
ClockI - interface that has been implemented.

getClock

public static ClockI getClock(String nbHome)
Returns clock implementation for the underlying operating system.

Parameters:
nbHome - - NB Home directory
Returns:
ClockI - interface that has been implemented.

getNBHome

public static String getNBHome()

getTimeMicroseconds

public long getTimeMicroseconds()
Returns time in microseconds

Specified by:
getTimeMicroseconds in class ClockI
Returns:
long - local time as microseconds

getTimeMilliseconds

public long getTimeMilliseconds()
Returns time in milliseconds

Specified by:
getTimeMilliseconds in class ClockI
Returns:
long - local time as milliseconds

sleep

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

Specified by:
sleep in class ClockI
Parameters:
sleepVal - - sleep time in milliseconds

main

public static void main(String[] args)
Simple test program.

Parameters:
args - - input arguments, no arguments used.


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