HmsTimer

org.specs2.time.HmsTimer
trait HmsTimer[T <: HmsTimer[T]]

This trait provides Timer functionalities based on the Java Calendar milliseconds

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class SimpleTimer

Members list

Value members

Abstract methods

def copy(elapsed: List[Long], started: List[Long]): T

Concrete methods

def add(t: HmsTimer[T]): T

add 2 timers together

add 2 timers together

Attributes

protected def getTime: Long

this method can be overridden for testing

this method can be overridden for testing

Attributes

def hms: String

Attributes

Returns

a formatted string showing the hours, minutes and seconds

def hourMinutesSecondsMillis: (Long, Long, Long, Long)

Attributes

Returns

a tuple with the elapsed hours, minutes, seconds and millis

def isStarted: Boolean

Attributes

Returns

true if this timer has been started

def neverStarted: Boolean

Attributes

Returns

true if this timer has never been started

def restart: T

restarts the Timer with no elapsed time

restarts the Timer with no elapsed time

Attributes

def start: T

starts the with new elapsed time

starts the with new elapsed time

Attributes

def stop: T

Stop the timer, store the number of elapsed millis and return a String representing the time as hour/minute/second/ms

Stop the timer, store the number of elapsed millis and return a String representing the time as hour/minute/second/ms

Attributes

Returns

the elapsed time as a Long representing milliseconds

def time: String

Attributes

Returns

a formatted string showing the hours, minutes, seconds and millis

def totalMillis: Long

Concrete fields

protected val elapsedTimes: List[Long]

elapsed times since for each stop

elapsed times since for each stop

Attributes

val startedTimestamps: List[Long]

each time the timer is started we add the current time to this list of times number of millis when instantiating the object using this Trait

each time the timer is started we add the current time to this list of times number of millis when instantiating the object using this Trait

Attributes