Observation: Expected MainThread to clock in at roughly 00:00:02.5, but took the same time as MainThreadIgnoreTimeScale.
I've tested different time measurement methods (System.Diagnostics.Stopwatch, UnityEngine.Time.unscaledTime, (DateTime.Now - StartDateTime)) and always got the same results.
I've also tested running this immediately on app start, or some seconds after (to give enough time for any warm-up / frame-skips that may occur), and with or without waiting a bit after setting Time.timeScale. Always the same results.
I also ran equivalent tests on Observable.Timer(dueTime, period, scheduler), and everything works correctly there. So the bug is limited to Observable.Delay, it seems.
Please do let me know if I can provide any further information!
Environment:
I've ran the following test, once with
Time.timeScale = 0.5f
and once withTime.timeScale = 2f
:Results:
Time.timeScale = 0.5f:
Observation: Expected MainThread to clock in at roughly 00:00:10.0, but took over 2 seconds longer than expected.
Time.timeScale = 2f:
Observation: Expected MainThread to clock in at roughly 00:00:02.5, but took the same time as MainThreadIgnoreTimeScale.
I've tested different time measurement methods (System.Diagnostics.Stopwatch, UnityEngine.Time.unscaledTime, (DateTime.Now - StartDateTime)) and always got the same results.
I've also tested running this immediately on app start, or some seconds after (to give enough time for any warm-up / frame-skips that may occur), and with or without waiting a bit after setting Time.timeScale. Always the same results.
I also ran equivalent tests on
Observable.Timer(dueTime, period, scheduler)
, and everything works correctly there. So the bug is limited toObservable.Delay
, it seems.Please do let me know if I can provide any further information!