collect Stds to StdLib

This commit is contained in:
lyon 2022-01-30 17:37:21 +08:00
parent e4783c0b6c
commit 97688e16d7
9 changed files with 12 additions and 18 deletions

View File

@ -60,4 +60,4 @@ Arg* PikaStdData_List___get__(PikaObj* self) {
void PikaStdData_List___set__(PikaObj* self) {
PikaStdData_List_set(self, obj_getArg(self, "__val"),
obj_getInt(self, "__key"));
}
}

View File

@ -3,35 +3,30 @@ import PikaStdData
class Task(TinyObj):
calls = PikaStdData.List()
calls_always = PikaStdData.List()
calls_when = PikaStdData.List()
assert_when = PikaStdData.List()
calls_period = PikaStdData.List()
assert_period = PikaStdData.List()
time_period = PikaStdData.List()
def __init__():
pass
# regist a function to be called always
def call_always(fun_todo: any):
pass
# regist a function to be called when fun_when() return 'True'
def call_when(fun_todo: any, fun_when: any):
pass
# regist a function to be called periodically
def call_period_ms(fun_todo: any, period_ms: int):
pass
# run all registed function once
def run_once():
pass
# run all registed function forever
def run_forever():
pass
# 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

View File

@ -1,6 +1,6 @@
pkg=$1
cp package/pikascript/pikascript-lib/$pkg ../../package/ -r
cp package/pikascript/$pkg.py ../../package/$pkg/
git add package/pikascript/pikascript-lib/$pkg
cp package/pikascript/pikascript-lib/PikaStdLib ../../package/ -r
cp package/pikascript/$pkg.py ../../package/PikaStdLib/
git add package/pikascript/pikascript-lib/PikaStdLib
git add package/pikascript/$pkg.py
git add ../../package/$pkg
git add ../../package/PikaStdLib