diff options
Diffstat (limited to 'src/Update/UpdateTimer.elm')
-rw-r--r-- | src/Update/UpdateTimer.elm | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Update/UpdateTimer.elm b/src/Update/UpdateTimer.elm new file mode 100644 index 0000000..d8861b7 --- /dev/null +++ b/src/Update/UpdateTimer.elm @@ -0,0 +1,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 } |