Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Timer optimisation
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #2
RE: Timer optimisation
Worldgem bit need a constant timer running to keep spawning more objects when needed, when reach TIMER=0 it will do these checks and start the timer again to check again later, so you don't have to worry about this

But anyway, timer precision is a bit complex, because OS timer is based on CPU clock, which is based on CPU ticks, which is based on electricity. Sounds weird, but CPU tick is like electricity, it keeps "ticking" hundreds/millions times per sec (thats why CPU speed is measured in hertz = Hz/MHz/GHz), each tick takes about 10 to 16μs (microsecond), and since this number is not static, the tick counter can also drift a bit after millions of ticks, causing this difference between CPU clock and realtime clock

This also affect the OS and everything running on it. OS will rarely show wrong date/time on interface because it periodically connect on a external server to sync the date/time, but sphere doesn't do this, so it should deal with this timing difference

Honestly I don't know why the OS doesn't report the correct timer value to sphere, because sphere just reads the OS timer using the API provided by OS itself. But anyway on next sphere build (probably build 1035) I will do some tests changing this API, you can try using this build to check if it will get better results
(This post was last modified: 03-08-2020 04:13 PM by Coruja.)
03-08-2020 09:36 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Messages In This Thread
Timer optimisation - Jhobean - 02-28-2020, 12:03 PM
RE: Timer optimisation - Coruja - 03-08-2020 09:36 AM
RE: Timer optimisation - Jhobean - 03-08-2020, 09:56 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)