module Model.Timer ( Timer , initialTimer , initTime ) where import List import Time exposing (Time) import Model.TimerState exposing (..) type alias Timer = { creationTime : Time , name : Maybe String , initialTime : Time , currentTime : Time , state : TimerState } initialTimer : Time -> Timer initialTimer creationTime = let initialTime = 5 * 60 * 1000 in { creationTime = creationTime , name = Nothing , initialTime = initialTime , currentTime = initTime initialTime , state = Idle } initTime : Time -> Time initTime t = t + 999