cgl.narada.service.timer
Class WindowsClock

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

public class WindowsClock
extends ClockI

Version:
1.0

Field Summary
 
Fields inherited from class cgl.narada.service.timer.ClockI
currentTimeMicros, currentTimeMillis, globalServiceProperties, OSArch, OSName, servicePropertiesFactory
 
Method Summary
static ClockI getClock()
          Returns clock implementation for Windows machines.
 long getLocalMicroseconds()
          Makes a call to native side to get local clock time as microseconds
 long getLocalMilliseconds()
          Makes a call to native side to get local clock time as milliseconds
 long getTimeMicroseconds()
          Returns time in microseconds.
 long getTimeMilliseconds()
          Returns time in milliseconds.
static void main(String[] args)
          Simple test program.
 void sleep(int sleepVal)
          Makes a call to native side to 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 Windows machines.

Returns:
ClockI - interface that has been implemented.

getLocalMicroseconds

public long getLocalMicroseconds()
Makes a call to native side to get local clock time as microseconds

Returns:
long - time as microseconds

getLocalMilliseconds

public long getLocalMilliseconds()
Makes a call to native side to get local clock time as milliseconds

Returns:
long - time as milliseconds

sleep

public void sleep(int sleepVal)
Makes a call to native side to causes thread to sleep for the specified amount in milliseconds.

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

getTimeMicroseconds

public long getTimeMicroseconds()
Returns time in microseconds. Adjusts time with base time.

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

getTimeMilliseconds

public long getTimeMilliseconds()
Returns time in milliseconds. Adjusts time with base time.

Specified by:
getTimeMilliseconds in class ClockI
Returns:
long - time as 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