Real time at the beginning of the frame
Hello, I am interested in the real time elapsed in the game at the beginning of the frame. I see in the documentation that Time.time almost does that. Just it is affected by time scale. Time.realTimeSinceStartup will unfortunately not work because it just uses the system clock. We could be accessing the system clock several milliseconds after the frame has already been displaying on the screen.
The reason is that I am programming a psychology experiment and I want to know when a stimulus is drawn to the screen. With vsync, I am hoping that the beginning of the frame and the display time will line up pretty well.
Answer by msdsmith · Oct 02, 2017 at 04:14 PM
What kind of accuracy do you need?
The WaitForEndOfFrame event will give you timing for when the current frame gets passed to the video card. Unforunately there will be a delay between that timing and when the frame actually appears on your monitor and this delay is not necessarily consistent or easy to measure.
Take a look at this question and the answers to it for more information: http://answers.unity3d.com/questions/1248918/timing-of-waitforendofframe-relative-to-vertical-b.html
Your answer
Follow this Question
Related Questions
How do I pause the game's timer but allow the player to move? 0 Answers
how can i take time value from timer (Asked again clearly) 2 Answers
rigidbody velocity changes rapidly(fly) after change timescale 1 Answer
Why is my deltaTime wrapper slightly faster than time.deltaTime? 1 Answer
Wait time after coroutine's wait seconds is complete 0 Answers