Time measurement



How I can to measure time of executing my function?


!ms_real1: 0.0
!s1: 0
!ms_real2: 0.0
!s2: 0

GameLib.accurate_real_time(@@world, s1, ms_real1)
GameLib.accurate_real_time(@@world, s2, ms_real2)

!s: s2 - s1
!ms: ms_real2 - ms_real1
println(s " " ms)


Yes - GameLib.accurate_real_time() should do the trick. That is the UE4 call that we’ve been using.

It is a bit cumbersome, though you could wrap it in a custom method to help simplify it.


I might get it wrong but I found that _wait_until() does not work as expected in PIE mode, the timer that used by _wait_until (if there is one) should reset on every play (PIE).


This is a bug, I’ve reproduced it locally, thanks for reporting.