add interval from timer_elapse_seconds() result, add timers to twn_api.json

This commit is contained in:
veclavtalica
2025-02-20 14:04:04 +03:00
parent 5228fa7e41
commit f805bf3f92
2 changed files with 29 additions and 1 deletions

View File

@ -264,6 +264,34 @@
]
},
"timer_tick_seconds": {
"module": "util",
"symbol": "tick_seconds",
"header": "twn_util.h",
"params": [
{ "name": "seconds_left", "type": "float" }
],
"return": "float"
},
"timer_elapse_seconds": {
"module": "util",
"symbol": "elapse_seconds",
"header": "twn_util.h",
"params": [
{ "name": "seconds_left", "type": "float" },
{ "name": "interval", "type": "float" }
],
"return": {
"fields": [
{ "name": "seconds_left", "type": "float" },
{ "name": "interval", "type": "float" },
{ "name": "elapsed", "type": "bool" }
],
"c_type": "TimerElapseSecondsResult"
}
},
"log_vec2": {
"module": "util",
"symbol": "log_vec2",