[ready]Timer queuing tweaks: binary sorted inserts and rolling buckets. (#33098)

* Timer queuing tweaks: binary sorted inserts and rolling buckets.

Client time timers now uses a binary search algorithm for its sorted inserts.

Processing now uses a binary sorted insert, rather then sorting it with sortTim during bucket_shifts.

Buckets now automatically wrap around rather then get regenerated every minute. (Rolling queue)

* Fixes some queue management bugs.

* Fixes a Order of Operations goof up in the ticks<->ds macros.

@ninjanomnom your pain is my success

* Remove debug line

* Fixes some binary insert bugs, fixes client time timers, moved id over to GUID

* Fixes initialization-time timers fucking everything up
This commit is contained in:
Kyle Spier-Swenson
2017-12-08 13:02:34 -08:00
committed by CitadelStationBot
parent a8311d6adf
commit 811517ecb2
2 changed files with 202 additions and 103 deletions
+2 -2
View File
@@ -22,6 +22,6 @@ When using time2text(), please use "DDD" to find the weekday. Refrain from using
#define TICKS *world.tick_lag
#define DS2TICKS(DS) (DS/world.tick_lag)
#define DS2TICKS(DS) ((DS)/world.tick_lag)
#define TICKS2DS(T) (T TICKS)
#define TICKS2DS(T) ((T) TICKS)