blob: 89af67e585b2c99be0935d42de22204ca4d4075d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
module Timer.Model exposing
( Timer
, init
)
import List
import Time exposing (Time)
import Timer.Model.State exposing (..)
type alias Timer =
{ creationTime : Time
, name : Maybe String
, initialTime : Time
, time : Time
, state : State
}
init : Time -> Timer
init creationTime =
let initialTime = 5 * 60 * 1000
in { creationTime = creationTime
, name = Nothing
, initialTime = initialTime
, time = initialTime
, state = Idle
}
|