Pebble.Cmd

Core watch commands.

Use this module for generic scheduling. Hardware controls live in Pebble.Hardware, watch metadata requests live in Pebble.WatchInfo, and key-value persistence helpers live in Pebble.Storage.

type Msg
    = WakeUp

scheduleWakeUp : Cmd Msg
scheduleWakeUp =
    timerAfter 1000

Native Pebble C API

  • Timer on developer.repebble.com

Scheduling

none

none : Cmd msg

A command that does nothing.

timerAfter

timerAfter : Int -> Cmd msg

Run a command after ms milliseconds.

Time

CurrentDateTime

type alias CurrentDateTime =
    { year : Int
    , month : Int
    , day : Int
    , dayOfWeek : Weekday
    , hour : Int
    , minute : Int
    , second : Int
    , utcOffsetMinutes : Int
    }

Structured local time/date information from the watch runtime.

getCurrentDateTime

getCurrentDateTime : (CurrentDateTime -> msg) -> Cmd msg

Request the current local date/time with UTC offset in minutes.