aboutsummaryrefslogtreecommitdiff
path: root/src/Update/UpdateTimer.elm
blob: d8861b7ffec73a874db298ea4a8f7e576765d23e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
module Update.UpdateTimer
  ( TimerAction(..)
  , updateTimer
  ) where

import Model.Timer (..)
import Model.Id (..)

type TimerAction =
  ToggleRunning

updateTimer : TimerAction -> Timer -> Timer
updateTimer action timer =
  case action of
    ToggleRunning ->
      { timer | isRunning <- not timer.isRunning }