org.apache.uima.util

## Interface UimaTimer

- All Superinterfaces:
    Serializable

      public interface UimaTimer
      extends Serializable

  Interface for a timer, used to collect performance statistics for UIMA components. A default Timer implementation can be obtained by calling `UIMAFramework.newTimer()`. A Timer implementation can also be specified in a `CollectionProcessingEngine` descriptor.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getDuration()` Gets the time between the last call to stopIt() and the last call to startIt().
    `int` | `getResolution()` Gets the timer resolution in milliseconds.
    `long` | `getTimeInMicros()` Gets the current time in microseconds.
    `long` | `getTimeInMillis()` Gets the current time in milliseconds.
    `long` | `getTimeInSecs()` Gets the current time in seconds.
    `long` | `startIt()` Starts the timer.
    `long` | `stopIt()` Stops the timer.

- - ### Method Detail

    - #### startIt

          long startIt()

      Starts the timer.
      Returns:
        the current time in milliseconds

    - #### stopIt

          long stopIt()

      Stops the timer.
      Returns:
        the current time in milliseconds

    - #### getDuration

          long getDuration()

      Gets the time between the last call to stopIt() and the last call to startIt().
      Returns:
        the duration in milliseconds

    - #### getTimeInSecs

          long getTimeInSecs()

      Gets the current time in seconds.
      Returns:
        the current time in seconds

    - #### getTimeInMillis

          long getTimeInMillis()

      Gets the current time in milliseconds.
      Returns:
        the current time in milliseconds

    - #### getTimeInMicros

          long getTimeInMicros()

      Gets the current time in microseconds.
      Returns:
        the current time in microseconds

    - #### getResolution

          int getResolution()

      Gets the timer resolution in milliseconds.
      Returns:
        the timer resolution in milliseconds

Copyright © 2006–2021 The Apache Software Foundation. All rights reserved.