summaryrefslogtreecommitdiff
path: root/test/test_stopwatch.py
blob: efcf9365e3d74afd9189cf1b2a0b190e7784c95c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import include_homekit
from homekit.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())