I'm really enjoying read these articles. especially optimizations.
https://technology.riotgames.com/news/profiling-case-missing-milliseconds
interesting thing is that just put one equal sign op removes 2ms stall.
currentTimeInMs > startTime + timeout
replace to
currentTimeInMs >= startTime + timeout
In addition, Riot tech blog has tons of great articles there so you should check that out.