-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathosTimer.pyi
More file actions
29 lines (21 loc) · 1.04 KB
/
Copy pathosTimer.pyi
File metadata and controls
29 lines (21 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""
Function:
The module provides a timer interface for the underlying OS. The OS timer timeout will trigger the bound callback function.
Descriptions taken from:
https://python.quectel.com/doc/quecpython/API_reference/en/syslib/osTimer.html
"""
class osTimer(object):
"""Creates an OS timer object.
Compared with machine.Timer, there is no limit on the number of created timers.
"""
def start(self, initialTime, cyclialEn, callback):
"""Start Timer
:param initialTime: Integer type. The timeout for the timer. Unit: ms.
:param cyclialEn: Integer type. Loop or not. 0 - Once. 1 - Loop.
:param callback: Function type. Callback function triggered when the timer expires. Prototype: callback(arg). arg is not actually used and None can be configured directly.
:return: Integer type.0 - Successful execution;Other values - Failed execution
"""
def stop(self):
"""Stops the timer.
:return: Integer type. 0 - Successful execution;Other values - Failed execution
"""