diff options
Diffstat (limited to 'core/pause')
-rwxr-xr-x | core/pause | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/core/pause b/core/pause new file mode 100755 index 0000000..a55bd30 --- /dev/null +++ b/core/pause @@ -0,0 +1,13 @@ +#!/bin/sh +[ "$1" = "info" ] && echo "pause the timer" && exit 2 + +. "$core_path/lib" +. "$core_path/update" + +[ "$state" != 'running' ] && err "timer is not running" + +time="$("$time - $now" | bc)" +state='paused' + +save_state + |