PikaStdTask.pyi 861 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import PikaStdData
  2. import PikaStdLib
  3. class Task(PikaStdLib.SysObj):
  4. calls = PikaStdData.List()
  5. def __init__(self):
  6. pass
  7. # regist a function to be called always
  8. def call_always(self, fun_todo: any):
  9. pass
  10. # regist a function to be called when fun_when() return 'True'
  11. def call_when(self, fun_todo: any, fun_when: any):
  12. pass
  13. # regist a function to be called periodically
  14. def call_period_ms(self, fun_todo: any, period_ms: int):
  15. pass
  16. # run all registed function once
  17. def run_once(self):
  18. pass
  19. # run all registed function forever
  20. def run_forever(self):
  21. pass
  22. # run all registed function until time is up
  23. def run_until_ms(self, until_ms: int):
  24. pass
  25. # need be overried to supply the system tick
  26. def platformGetTick(self):
  27. pass