|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.tools.system.UserTime
@ALDMetaInfo(export=ALLOWED) public class UserTime
This is a stopwatch to measure elapsed user or real time used.
If the proper native library is availabe and is requested user time is
elapsed. Otherwith real time is elapsed.
If you like to use this class you must set the VM option
-Djava.library.path
to the directory where the native library
resides.
The native library is
JNI_time.dll
for Windows,libJNI_time.so
for Linux,libJNI_time.jnilib
for Mac OS X.
Constructor Summary | |
---|---|
UserTime()
Creates a new time object and starts the clock. |
|
UserTime(boolean useUsertime)
Creates a new time object and starts the clock elapsing real time. |
Method Summary | |
---|---|
double |
getElapsedTime()
Returns the elapsed time since last reset (or invoking the constructor) in seconds |
String |
getOperation()
Return UserTime or RealTime depending on mode of operation |
void |
reset()
Reset time |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UserTime()
public UserTime(boolean useUsertime)
useUsertime
is true and the runtime
library is available, otherwise the real time.
Method Detail |
---|
public double getElapsedTime()
public void reset()
public String getOperation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |