public class Clock
extends java.lang.Object
Vona's utils: a clock.
Copyright (C) 2004 Marsette A. Vona, III
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Modifier and Type | Field and Description |
---|---|
(package private) static java.lang.String |
cvsid
CVS id.
|
Constructor and Description |
---|
Clock() |
Modifier and Type | Method and Description |
---|---|
double |
getCurrentTime()
Get the time in seconds relative to an arbitrary epoch.
|
protected void |
periodicThreadEnding(PeriodicThread periodicThread)
Hook called just before a
PeriodicThread ends. |
protected void |
periodicThreadStarting(PeriodicThread periodicThread)
Hook called just after a
PeriodicThread starts. |
void |
sleep(double seconds)
Sleep the current thread for the requested number of seconds.
|
static final java.lang.String cvsid
CVS id.
public double getCurrentTime()
Get the time in seconds relative to an arbitrary epoch.
public void sleep(double seconds) throws java.lang.InterruptedException
Sleep the current thread for the requested number of seconds.
seconds
- how long to sleep in seconds, non-negativejava.lang.InterruptedException
protected void periodicThreadStarting(PeriodicThread periodicThread)
Hook called just after a PeriodicThread
starts.
periodicThread
- the periodic threadprotected void periodicThreadEnding(PeriodicThread periodicThread)
Hook called just before a PeriodicThread
ends.
periodicThread
- the periodic thread