Does the Time class only store "screenshots" of time rather than dynamically accessing it?

While performing a speed test in a script (for something totally unrelated), I noticed that Time.time always returns the same time when accessed from the same method. So I started doing time-check tests continuously inside Update() between constant iterations of a series of heavy calculations trying to get a different representation of time from within the same method. Anyway, after a few tests, I’ve yet to get different representations of time from within the same method. I’ve increased maximum allowable time step to 500 seconds just in case that was causing my method to end prematurely, which I highly doubt since I’m doing pure code testing with no physics or FixedUpdate() methods involved. I’ve also done the check inside coroutines but have gotten the same time representation even after the heavy for loops. At the moment, I’m led to believe that it’s because Time.time takes a “screenshot” of the internal timer prior to running a method and returns that throughout the entirety of that method whenever Time.time is accessed. However, it’s also possible that it’s due to float imprecision reassigning the returned time to the same float representation due to the minute differences in time, but I’m having a hard time coming up with a decent for loop that is neither too light to register any noticeable change in time nor too heavy to crash Unity (which has happened several times already during my testing).

So does anyone definitively know? Or am I just imagining things? 0_0


In case anyone is going “WTF?!” at my wall of text, let me explain in simpler terms.

In my experience, given:

void Update()
   fTime1 = Time.time;
   // insert heavy series of calculations here
   fTime2 = Time.time;

fTime1 will be equal to fTime2.

If you want time that’s not “frozen” within frames, use Time.realtimeSinceStartup.

Like the docs on Time.time states:

“The time this frame has started”. This value will be constant for the whole frame. Time.deltaTime is also constant for the whole frame.