Package EDU.purdue.cs.bloat.benchmark
Class Times
- java.lang.Object
-
- EDU.purdue.cs.bloat.benchmark.Times
-
public class Times extends java.lang.ObjectThis class allows Java to access the information obtained by the UNIX system call times.
-
-
Constructor Summary
Constructors Constructor Description Times()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidmain(java.lang.String[] args)Test program.static booleansnapshot()Takes a "snapshot" of the system.static floatsystemTime()Returns the system time used by this process in seconds.static floatuserTime()Returns the user time used by this process in seconds.
-
-
-
Method Detail
-
snapshot
public static boolean snapshot()
Takes a "snapshot" of the system. Reads various items from the result of times.- Returns:
- true if everything is successful
-
userTime
public static float userTime()
Returns the user time used by this process in seconds.
-
systemTime
public static float systemTime()
Returns the system time used by this process in seconds.
-
main
public static void main(java.lang.String[] args) throws java.lang.ExceptionTest program.- Throws:
java.lang.Exception
-
-