Trait/Object

de.h2b.scala.lib.util

Timer

Related Docs: object Timer | package util

Permalink

trait Timer extends AnyRef

Provides timer functionality.

Based on my Java class Timer (as of 2006, has been nested in Clock class) that itself had a long history of Modula2 (1987-90) and C (1994) implementations.

The timer will start immediately on construction, so it is not required to start or reset it explictely (although it does no harm). Arbitrary many start (implicit or explicit) and stop cycles can be passed through. The times measured on each cycle are cumulated and the result is returned by the reading method, while the lap method adds the time since the last stop to that result.

Copyright (C) 1987, 1989, 1990, 1994, 2006, 2015 Hans-Hermann Bode

Version

3.0

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Timer
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def systemTime: Long

    Permalink
    Attributes
    protected

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  9. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  11. def lap: Long

    Permalink

    returns

    the current timer value (like the lap function of a stopwatch)

  12. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  14. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  15. def reading: Long

    Permalink

    returns

    the cumulative time of all start/stop cycles so far

  16. def reset(): Unit

    Permalink

    Sets the timer to zero.

  17. def start(): Unit

    Permalink

    Starts a new measuring cycle without resetting the timer.

  18. def stop(): Long

    Permalink

    Stops the current measuring cycle without resetting the timer.

    Stops the current measuring cycle without resetting the timer.

    returns

    the reading (cumulative time of all cycles so far)

  19. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  20. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from AnyRef

Inherited from Any

Ungrouped