homekit/test/test_stopwatch.py
2023-06-10 23:20:37 +03:00

18 lines
328 B
Python
Executable File

import __py_include
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())