Sleitnick / AeroGameFramework

AeroGameFramework is a Roblox game framework that makes development easy and fun. The framework is designed to simplify the communication between modules and seamlessly bridge the gap between the server and client.
https://sleitnick.github.io/AeroGameFramework/
MIT License
215 stars 57 forks source link

Update to use os.clock. #203

Closed howmanysmall closed 3 years ago

howmanysmall commented 4 years ago

os.clock is preferred to tick, as well as being faster.

OverHash commented 4 years ago

I don't like this change. From the details of the forum post introducing these new os functions, I gathered the following information: os.time = unix timestamp (1s resolution, stable baseline from the 1870s) os.clock = for measuring performance, 1us resolution but no stable baseline time = time since game has been running simulation for, monotonic and reasonable precision. this should have been what tick() is but oh well

os.clock is specifically designed for perf benchmarking and places where the same time may be requested very close to each other, so I feel as though time is better suited here, especially as it's every frame (which is quite a long time between calls)

Sleitnick commented 3 years ago

Necessary changes have been made in https://github.com/Sleitnick/AeroGameFramework/pull/206