public final class Stopwatch extends Object
Copied from javapractice.com
Constructor and Description |
---|
Stopwatch() |
Modifier and Type | Method and Description |
---|---|
static void |
main(String... arguments)
An example of the use of this class to
time the execution of String manipulation code.
|
void |
start()
Start the stopwatch.
|
void |
stop()
Stop the stopwatch.
|
String |
toString()
Express the "reading" on the stopwatch.
|
long |
toValue()
Express the "reading" on the stopwatch as a numeric type.
|
public static void main(String... arguments)
public void start()
IllegalStateException
- if the stopwatch is already running.public void stop()
IllegalStateException
- if the stopwatch is not already running.public String toString()
toString
in class Object
IllegalStateException
- if the Stopwatch has never been used,
or if the stopwatch is still running.public long toValue()
IllegalStateException
- if the Stopwatch has never been used,
or if the stopwatch is still running.Copyright © 2015–2021 Fiji. All rights reserved.