aboutsummaryrefslogtreecommitdiff
path: root/src/Model
diff options
context:
space:
mode:
Diffstat (limited to 'src/Model')
-rw-r--r--src/Model/Model.elm5
-rw-r--r--src/Model/Timer.elm17
2 files changed, 0 insertions, 22 deletions
diff --git a/src/Model/Model.elm b/src/Model/Model.elm
index ad1e9da..b929261 100644
--- a/src/Model/Model.elm
+++ b/src/Model/Model.elm
@@ -1,7 +1,6 @@
module Model.Model
( Model
, initialModel
- , substractTimersTime
, numberOfTimers
) where
@@ -32,9 +31,5 @@ initialModel initialTime =
, timerEdition = Nothing
}
-substractTimersTime : Time -> Dict Id Timer -> Dict Id Timer
-substractTimersTime t timers =
- Dict.map (\id timer -> substractTimerTime t timer) timers
-
numberOfTimers : Model -> Int
numberOfTimers = List.length << Dict.toList << .timers
diff --git a/src/Model/Timer.elm b/src/Model/Timer.elm
index b73016d..f05c487 100644
--- a/src/Model/Timer.elm
+++ b/src/Model/Timer.elm
@@ -1,7 +1,6 @@
module Model.Timer
( Timer
, initialTimer
- , substractTimerTime
, initTime
) where
@@ -28,21 +27,5 @@ initialTimer creationTime name =
, state = Idle
}
-substractTimerTime : Time -> Timer -> Timer
-substractTimerTime time timer =
- if timer.state == Running
- then
- let newTime = timer.currentTime - time
- in if newTime <= 0.0
- then
- { timer
- | currentTime <- 0.0
- , state <- Ringing
- }
- else
- { timer | currentTime <- newTime }
- else
- timer
-
initTime : Time -> Time
initTime t = t + 999