Package com.microej.wear.services

## Interface TimeService

-     public interface TimeService

  This service allows Features to get time information.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `addConfigurationListener​(TimeConfigurationListener listener)` | Adds the given `TimeConfigurationListener` to the list of listeners that are notified when the time configuration of the device has changed.
    `long` | `getCurrentTime()` | Returns the current time.
    `String` | `getTimeZoneId()` | Returns the current time zone ID.
    `int` | `getTimeZoneOffset()` |
    `void` | `removeConfigurationListener​(TimeConfigurationListener listener)` | Removes the given `TimeConfigurationListener` to the list of listeners that are notified when the time configuration of the device has changed.

- - ### Method Detail

    - #### getCurrentTime

          long getCurrentTime()

      Returns the current time.
      Returns:
        the current time (in milliseconds, measured from the Java Epoch)

    - #### getTimeZoneOffset

          int getTimeZoneOffset()

    - #### getTimeZoneId

          String getTimeZoneId()

      Returns the current time zone ID.

      The zone ID is a string that represents either a region-based time zone or a fixed offset from UTC.

      Returns:
        the current time zone ID

    - #### addConfigurationListener

          void addConfigurationListener​(TimeConfigurationListener listener)

      Adds the given `TimeConfigurationListener` to the list of listeners that are notified when the time configuration of the device has changed.
      Parameters:
        `listener` - the new listener to add

    - #### removeConfigurationListener

          void removeConfigurationListener​(TimeConfigurationListener listener)

      Removes the given `TimeConfigurationListener` to the list of listeners that are notified when the time configuration of the device has changed.

      Does nothing if the listener is not registered.

      Parameters:
        `listener` - the listener to be removed