Commit graph

8 commits

Author SHA1 Message Date
Rachael Alexanderson
3842071b23 - implemented i_timescale to control the flow of time. 2017-11-23 21:54:04 -05:00
Rachael Alexanderson
763222b571 - fixed: high uptime was causing overloads in uint32_t and float structures (float losing loss of precision) - this caused any computer online for more than a few days to experience jankiness with internal animations such as rotations and shader timers. Unfortunately, this sounds the death knell for 32-bit platforms, since uint64_t is now required in time-critical structures, which will hurt performance tremendeously, but 64-bit systems will be unaffected. 2017-11-14 16:15:25 -05:00
Christoph Oelckers
0323f54384 - rename I_FPSTime function.
- now that the frame buffer stores its render time, the 'ms' return from I_GetTimeFrac is not needed anymore, we may just as well use the globally stored value instead.

The only feature this value was ever used for was texture warping.
2017-11-13 00:54:32 +01:00
Christoph Oelckers
96e9eadd97 - removed I_MSTime entirely after checking how the wipe code actually works.
Since this calls I_WaitVBL, which resets the frame time, it was essentially just like calling a real-time timer anyway and nothing in it required a specific 0-timepoint.
The same applies to the ZScript interface. All it needs is a millisecond-precise timer with no semantics attached.
2017-11-13 00:38:04 +01:00
Christoph Oelckers
f54475b1f1 - I_FPSTime may not return the time at frame start.
This is used for real-time profiling and as such needs to return the current time or most of its uses will break.
2017-11-12 23:39:48 +01:00
Magnus Norddahl
efa7c3cacf - Fix typo in I_FPSTimeNS 2017-11-12 13:22:52 +01:00
Magnus Norddahl
e3141a4af3 - Upgrade timer code to use nanosecond accuracy internally 2017-11-12 12:57:19 +01:00
Christoph Oelckers
6bd76d6b5a - fixed compilation in debug mode.
- moved timer definitions into their own header/source files. d_main is not the right place for this.
- removed some leftover cruft from the old timer code.
2017-11-12 09:06:40 +01:00