diff options
Diffstat (limited to 'src/Model/Model.elm')
-rw-r--r-- | src/Model/Model.elm | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Model/Model.elm b/src/Model/Model.elm index b7ac48a..ad1e9da 100644 --- a/src/Model/Model.elm +++ b/src/Model/Model.elm @@ -2,11 +2,13 @@ module Model.Model ( Model , initialModel , substractTimersTime + , numberOfTimers ) where import Dict (Dict) import Dict import Time (Time) +import List import Model.Timer (..) import Model.TimerEdition (..) @@ -33,3 +35,6 @@ initialModel initialTime = 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 |