module Main exposing (..)
import Html exposing (Html, program, text)
import MountableProgram as Mountable exposing (Mountable, mountableProgram)
import Time
type alias Model =
()
type Msg
= Tick Time.Time
main : Program Never (Mountable Model) (Mountable.Msg Msg)
main =
mountableProgram
{ init = init
, view = \_ -> text "Hello, I am leaking."
, update = update
, subscriptions = \_ -> Time.every (2 * Time.second) Tick
}
init : ( (), Cmd msg )
init =
() ! []
getSeconds : a -> String
getSeconds =
toString >> String.slice 0 -3
update : Msg -> a -> ( a, Cmd Msg )
update msg model =
case msg of
Tick time ->
let
_ =
Debug.log "tick" (getSeconds time)
in
model ! []