CTL
Class Timer

java.lang.Object
  extended by CTL.Timer

public class Timer
extends java.lang.Object

Timer


Field Summary
private  long time
          Some time value
 
Constructor Summary
Timer()
          Constructor
 
Method Summary
private static long getTime()
          Helper method for retrieving the current time
static void main(java.lang.String[] args)
          Test function
static void sleep(long millisecs)
          Sleep for some time
 long stop()
          Stop the timer and reset the internal time
 long stop2()
          Stop the timer and do not reset the interal timer
static java.lang.String timestr(long time)
          Convert a time value to a string
 java.lang.String toString()
          Conversion to string
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

time

private long time
Some time value

Constructor Detail

Timer

public Timer()
Constructor

Method Detail

getTime

private static long getTime()
Helper method for retrieving the current time

Returns:
Current time in milliseconds

stop

public long stop()
Stop the timer and reset the internal time

Returns:
Time passed

stop2

public long stop2()
Stop the timer and do not reset the interal timer

Returns:
Time passed

timestr

public static java.lang.String timestr(long time)
Convert a time value to a string

Parameters:
time - Time
Returns:
String

toString

public java.lang.String toString()
Conversion to string

Overrides:
toString in class java.lang.Object
Returns:
String

sleep

public static void sleep(long millisecs)
Sleep for some time

Parameters:
millisecs - Milliseconds to sleep

main

public static void main(java.lang.String[] args)
Test function