aboutsummaryrefslogtreecommitdiff
path: root/core/pause
diff options
context:
space:
mode:
Diffstat (limited to 'core/pause')
-rwxr-xr-xcore/pause13
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
+