public class Clock
extends java.lang.Object
implements java.awt.event.ActionListener
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent ae)
Timer events handler
|
static long |
getClock()
Return current time in milliseconds
|
static double |
getCurrentTime()
Return current time in hours
|
static long |
getDay()
Return current day
|
static long |
getHour()
Return current hour
|
static long |
getMinute()
Return current minute
|
static long |
getSecond()
Return current second
|
static float |
getTimeScale() |
static void |
setClock(long msec)
Method to set clock milliseconds
|
static void |
setTimeScale(float ts)
Method to change time scale
|
public void actionPerformed(java.awt.event.ActionEvent ae)
actionPerformed
in interface java.awt.event.ActionListener
ae
- - Event objectpublic static void setTimeScale(float ts)
ts
- - new time scalepublic static long getClock()
public static void setClock(long msec)
msec
- - millisecondspublic static double getCurrentTime()
public static long getDay()
public static long getHour()
public static long getMinute()
public static long getSecond()
public static float getTimeScale()