From e1848caa002c648e916283cda251032391f71861 Mon Sep 17 00:00:00 2001 From: Stefan Huber Date: Sat, 9 Nov 2013 16:35:09 +0100 Subject: [PATCH] Add timer.py --- timer.py | 118 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) create mode 100644 timer.py diff --git a/timer.py b/timer.py new file mode 100644 index 0000000..4f842e7 --- /dev/null +++ b/timer.py @@ -0,0 +1,118 @@ +#!/usr/bin/python3 + +import sys +import time +import datetime + +units = {"s" : 1, "m" : 60, "h" : 60*60, "d" : 24*60*69 } + +def reprint(value, file=sys.stdout, end=""): + print("\r" + value, file=file, end=end) + + +def usage(): + print("""Usage: {0} [--reverse] [--offset