pikapython/package/PikaStdLib/PikaStdTask.py

38 lines
815 B
Python
Raw Normal View History

2022-01-20 18:16:08 +08:00
from PikaObj import *
import PikaStdData
2022-01-20 18:16:08 +08:00
class Task(TinyObj):
2022-01-31 01:49:34 +08:00
calls = PikaStdData.List()
2022-01-20 18:16:08 +08:00
def __init__():
pass
2022-01-31 01:49:34 +08:00
# regist a function to be called always
2022-01-20 18:16:08 +08:00
def call_always(fun_todo: any):
pass
2022-01-31 01:49:34 +08:00
# regist a function to be called when fun_when() return 'True'
2022-01-20 21:50:38 +08:00
def call_when(fun_todo: any, fun_when: any):
2022-01-20 18:16:08 +08:00
pass
2022-01-31 01:49:34 +08:00
# regist a function to be called periodically
def call_period_ms(fun_todo: any, period_ms: int):
pass
2022-01-31 01:49:34 +08:00
# run all registed function once
2022-01-20 18:16:08 +08:00
def run_once():
pass
2022-01-31 01:49:34 +08:00
# run all registed function forever
def run_forever():
2022-01-20 18:16:08 +08:00
pass
2022-01-31 01:49:34 +08:00
# run all registed function until time is up
def run_until_ms(until_ms: int):
pass
# need be overried to supply the system tick
def platformGetTick():
pass