From 973a039b54327df74396605410ea9abe19c8a4e7 Mon Sep 17 00:00:00 2001 From: Joris Date: Sun, 4 Sep 2016 21:21:11 +0200 Subject: Upgrade to elm 0.17.1 --- src/Timer/Model.elm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/Timer/Model.elm (limited to 'src/Timer/Model.elm') diff --git a/src/Timer/Model.elm b/src/Timer/Model.elm new file mode 100644 index 0000000..89af67e --- /dev/null +++ b/src/Timer/Model.elm @@ -0,0 +1,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 + } -- cgit v1.2.3