1
0
Fork 0

fix: simulator was missing some time functions

Signed-off-by: thiswillbeyourgithub <26625900+thiswillbeyourgithub@users.noreply.github.com>
This commit is contained in:
thiswillbeyourgithub 2023-09-18 17:01:02 +02:00 committed by Daniel Thompson
parent 9486899f4e
commit a7c3e68f25

View file

@ -5,6 +5,9 @@ import time
def sleep_ms(ms): def sleep_ms(ms):
time.sleep(ms / 1000) time.sleep(ms / 1000)
time.sleep_ms = sleep_ms time.sleep_ms = sleep_ms
time.ticks_ms = lambda : int(time.time() * 1000)
time.ticks_us = lambda : int(time.time() * 1000 * 1000)
time.ticks_diff = lambda x, y : x-y
import sys, traceback import sys, traceback
def print_exception(exc, file=sys.stdout): def print_exception(exc, file=sys.stdout):