summaryrefslogtreecommitdiff
path: root/src/test/test_stopwatch.py
blob: 6ff2c0e7370d23b56f25dbe0abc6e3520ff8d3d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from home.util import Stopwatch, StopwatchError
from time import sleep


if __name__ == '__main__':
    s = Stopwatch()
    s.go()
    sleep(2)
    s.pause()
    s.go()
    sleep(1)
    print(s.get_elapsed_time())
    sleep(1)
    print(s.get_elapsed_time())
    s.pause()
    print(s.get_elapsed_time())