PamUtils
Class SystemTiming
java.lang.Object
PamUtils.SystemTiming
public class SystemTiming
- extends java.lang.Object
Class for some system based time functions, primarily to get
CPU time for the process and to set the system time. These are
bundled together here purely for the convenience of having the
native code in a single dll. A windows DLL has been written -
we need someone to write DLL's for other OS.
- Author:
- Doug Gillespie
- See Also:
PamProfiler
|
Field Summary |
private static boolean |
loadOK
|
private static boolean |
loadTried
|
private static java.lang.String |
SILIB
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SILIB
private static final java.lang.String SILIB
- See Also:
- Constant Field Values
loadOK
private static boolean loadOK
loadTried
private static boolean loadTried
SystemTiming
public SystemTiming()
sysGetProcessCPUTime
private static long sysGetProcessCPUTime()
- Returns:
sysSetSystemTime
private static boolean sysSetSystemTime(int year,
int month,
int day,
int hour,
int minute,
int second,
int millisecond)
- Set the computers system time
- Parameters:
year - Yearmonth - Month (1 - 12)day - Day (1 - 31)hour - Hour (0 - 23)minute - Minute (0 - 59)second - Second (0 - 59)millisecond - Millisecond (0 - 999)
- Returns:
- true if successful
load
public static void load()
getProcessCPUTime
public static long getProcessCPUTime()
- Returns:
- the amount of CPU used by the current process in 100ns intervals
setSystemTime
public static boolean setSystemTime(long timeMilliseconds)
setSystemTime
public static boolean setSystemTime(java.util.Calendar c)