subsystem changes (#5332)

1. de-tickers basically everything that doesn't need to be a ticker (so
most of them)
2. makes SSdpc not awful (thanks @Lohikar)

---------

Co-authored-by: silicons <no@you.cat>
This commit is contained in:
silicons
2023-04-09 18:35:20 -07:00
committed by GitHub
co-authored by silicons
parent dc0cf7a728
commit d76b535a65
10 changed files with 59 additions and 39 deletions
+5
View File
@@ -29,6 +29,7 @@ SUBSYSTEM_DEF(timer)
name = "Timer"
wait = 1 // SS_TICKER subsystem, so wait is in ticks
init_order = INIT_ORDER_TIMER
runlevels = RUNLEVELS_ALL
priority = FIRE_PRIORITY_TIMER
subsystem_flags = SS_TICKER|SS_NO_INIT
@@ -664,6 +665,10 @@ SUBSYSTEM_DEF(timer)
stack_trace("addtimer called with a callback assigned to a qdeleted object. In the future such timers will not \
be supported and may refuse to run or run with a 0 wait")
if (wait == 0 && !flags)
SSdpc.queued_calls += callback
return
wait = max(CEILING(wait, world.tick_lag), world.tick_lag)
if(wait >= INFINITY)