Package com.wowza.util
Class ElapsedTimer
Object
com.wowza.util.ElapsedTimer
ElapsedTimer: Utility class for keep track of the duration an object has been in existence.
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new ElapsedTimer and start the clockElapsedTimer
(long timestamp) -
Method Summary
Modifier and TypeMethodDescriptiongetDate()
Get the date the object was createdGet the date object was created as formatted Stringlong
getTime()
Get elapsed time object in existence (milliseconds)double
Get elapsed time object in secondsGet elapsed time object in existence as formatted String (Ex: 3 days 2 minutes 5 seconds)
-
Constructor Details
-
ElapsedTimer
public ElapsedTimer()Construct a new ElapsedTimer and start the clock -
ElapsedTimer
public ElapsedTimer(long timestamp)
-
-
Method Details
-
getDate
Get the date the object was created- Returns:
- date object created
-
getDateString
Get the date object was created as formatted String- Returns:
- date object created as formatted String
-
getTime
public long getTime()Get elapsed time object in existence (milliseconds)- Returns:
- elapsed time (milliseconds)
-
getTimeSeconds
public double getTimeSeconds()Get elapsed time object in seconds- Returns:
- elapsed time in seconds
-
getTimeString
Get elapsed time object in existence as formatted String (Ex: 3 days 2 minutes 5 seconds)- Returns:
- elapsed time as formatted String
-