Skip to content

Commit daa64e8

Browse files
committed
Fix missing functions
1 parent 9a1f0f7 commit daa64e8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

BlynkLib.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,9 @@
3434
except ImportError:
3535
const = lambda x: x
3636
idle_func = lambda: 0
37+
setattr(sys.modules['time'], 'sleep_ms', lambda ms: time.sleep(ms // 1000))
3738
setattr(sys.modules['time'], 'ticks_ms', lambda: int(time.time() * 1000))
39+
setattr(sys.modules['time'], 'ticks_diff', lambda s, e: e - s)
3840

3941
HDR_LEN = const(5)
4042
HDR_FMT = "!BHH"

0 commit comments

Comments
 (0)