Package: com.multiversesocial.hyperview
Class: com.multiversesocial.hyperview.SystemClock
Source: src/com/multiversesocial/hyperview/SystemClock.java
/////////////////////////////////////////////////////// By Tony Swain... - A system clock with a 1 second resolution.
Extends: none
Implements: Runnable
public class SystemClock implements Runnable
| Declaration | Value / initializer | Description | Source |
|---|---|---|---|
static Calendar calendar | = Calendar.getInstance() | No comment in source; used in run(). | |
static String clock | = "" | No comment in source; assigned in start(), run(); used in getClockString(). | |
static volatile SystemClock clockBase | = null | No comment in source; assigned in SystemClock(), start(), stop(), getSystemClock(), getClockString(). | |
volatile Thread clockTask | No comment in source; assigned in start(), stop(); used in run(), join(). | ||
static Date date | = new Date(System.currentTimeMillis()) | No comment in source; used in start(), run(). | |
SimpleDateFormat dateFormat | No comment in source; assigned in SystemClock(); used in start(), run(). | ||
volatile int day | No comment in source; assigned in SystemClock(), run(). | ||
static final int HOUR | = 10 Calendar.HOUR | No comment in source; used in run(). | |
volatile int hour | No comment in source; assigned in SystemClock(), run(). | ||
volatile int idleCount | No comment in source; assigned in SystemClock(). | ||
int iteration | No comment in source; assigned in SystemClock(). | ||
static final int MINUTE | = 12 Calendar.MINUTE | No comment in source; used in run(). | |
volatile int minute | No comment in source; assigned in SystemClock(), run(). | ||
static final int MONTH | = 2 Calendar.MONTH | No comment in source; used in run(). | |
volatile int month | No comment in source; assigned in SystemClock(), run(). | ||
static final int MONTH_DAY | = 5 Calendar.DAY_OF_MONTH | No comment in source; used in run(). | |
volatile long now | No comment in source; assigned in SystemClock(), start(), run(). | ||
static final int SC_RUNNING | = 1 | No comment in source; used in run(), isRunning(); name appears in 1 other source file(s): HyperConnectionHandler. | |
int scFlags | No comment in source; assigned in SystemClock(), run(); used in isRunning(). | ||
static final int SECOND | = 13 Calendar.SECOND | No comment in source; used in run(). | |
volatile int second | No comment in source; assigned in SystemClock(), run(). | ||
long startTime | No comment in source; assigned in SystemClock(). | ||
int timeout | No comment in source; assigned in SystemClock(). | ||
volatile HyperLinkedList timerList | No comment in source; assigned in SystemClock(); used in run(), getTimer(), addTimer(), remove(). | ||
static final String version | = "1.3" | No comment in source; used in start(). | |
static int waitTime | = 1000 | No comment in source; assigned in setWaitTime(); used in run(); name appears in 14 other source file(s): CollisionManager, Dispatch, HyperChannel, HyperConnectionHandler …. | |
static final int YEAR | = 1 Calendar.YEAR | No comment in source; not referenced by name in this type’s methods. | |
volatile int year | No comment in source; assigned in SystemClock(). |
| Signature | Description | Source |
|---|---|---|
SystemClock() | 17 statement(s); calls super(), System.currentTimeMillis(), Locale.getDefault(), dateFormat.applyPattern(), System.exit(); creates SimpleDateFormat, HyperLinkedList. | |
SystemClock(HyperConnectionHandler tHandler) | 17 statement(s); calls super(), System.currentTimeMillis(), Locale.getDefault(), dateFormat.applyPattern(), System.exit(); creates SimpleDateFormat, HyperLinkedList. |
| Signature | Description | Source |
|---|---|---|
static { … } | Implicit default constructor generated by the compiler (not written in the source). | |
public void addTimer(SystemTimer tTimer) | 1 statement(s); calls timerList.dlStore(), notifyAll(). | |
public void addTimer(HyperLinkedList tList) | 1 statement(s); calls timerList.dlStore(), notifyAll(). | |
public void addTimer(SystemTimer[] tTimer, boolean tRepeat) | 3 statement(s); calls timerList.dlStore(), notifyAll(). | |
static String getClockString() | 2 statement(s); creates SystemClock. | |
static SystemClock getSystemClock() | 2 statement(s); calls clockBase.start(); creates SystemClock. | |
SystemTimer getTimer() | 3 statement(s); calls timerList.dlStore(), notifyAll(); creates SystemTimer. | |
SystemTimer getTimer(int tSeconds) | 4 statement(s); calls timerList.dlStore(), notifyAll(); creates SystemTimer. | |
SystemTimer getTimer(int tSeconds, boolean tRepeat) | 4 statement(s); calls timerList.dlStore(), notifyAll(); creates SystemTimer. | |
public boolean isRunning() | Returns ((scFlags & SC_RUNNING) != 0). | |
public void join() throws InterruptedException | 1 statement(s); calls clockTask.join(). | |
public synchronized void remove(Linkable tTimer) | 1 statement(s); calls timerList.dlDelete(). | |
public synchronized void remove(SystemTimer[] tTimer) | 3 statement(s); calls timerList.dlDelete(). | |
public void run() | 5 statement(s); calls Thread.currentThread(), wait(), notifyAll(), System.currentTimeMillis(), date.setTime() …. | |
void setWaitTime(int tMillis) | Sets waitTime = tMillis. | |
public void start() | 9 statement(s); calls tTask.interrupt(), clockTask.setName(), System.currentTimeMillis(), date.setTime(), dateFormat.format() …; creates Thread. | |
public void stop() | 4 statement(s); calls tThread.interrupt(). |
instantiation — HyperConnectionHandler.java, line 156
156 clock = new SystemClock(this);
static call — SystemTimer.java, line 24
24 static SystemClock systemClock = SystemClock.getSystemClock();