Class Timer
java.lang.Object
jcuda.utils.Timer
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
Creates a "pretty" String containing a summary of all timers that currently exist.static void
createTimer
(Object name) Creates a new timer with the given namestatic void
deleteTimer
(Object name) Deletes the timer with the given namestatic int
getAverageTimerValue
(Object name) Returns the average time in milliseconds for the timer, which is the total time for the timer divided by the number of completed (stopped) runs the timer has made.static int
getTimerValue
(Object name) Returns the total time in milliseconds of all runs since the creation or the last reset.static void
Pretty print a summary of all timers that currently existstatic void
resetTimer
(Object name) Reset the timer with the given namestatic void
startTimer
(Object name) Start the timer with the given namestatic void
Stop the timer with the given name
-
Method Details
-
createTimer
Creates a new timer with the given name- Parameters:
name
- The name of the timer
-
deleteTimer
Deletes the timer with the given name- Parameters:
name
- The name of the timer
-
startTimer
Start the timer with the given name- Parameters:
name
- The name of the timer
-
stopTimer
Stop the timer with the given name- Parameters:
name
- The name of the timer
-
resetTimer
Reset the timer with the given name- Parameters:
name
- The name of the timer to reset
-
getTimerValue
Returns the total time in milliseconds of all runs since the creation or the last reset.- Parameters:
name
- The name of the timer- Returns:
- The time
-
getAverageTimerValue
Returns the average time in milliseconds for the timer, which is the total time for the timer divided by the number of completed (stopped) runs the timer has made. This excludes the current running time if the timer is currently running.- Parameters:
name
- The name of the timer- Returns:
- The average timer value
-
prettyPrint
public static void prettyPrint()Pretty print a summary of all timers that currently exist -
createPrettyString
Creates a "pretty" String containing a summary of all timers that currently exist.- Returns:
- A pretty summary
-