Function to run on each hour
#5

Quote:
Originally Posted by Jonesy96
Посмотреть сообщение
I don't particularly want to have a timer that's running a function every second in all honesty, it's only going to slow things down.
If your only syncing time it wont slow things down. There are no complex calculations or slow code involved. Easiest way would be to use a timer, set it to a time you want your accuracy to be within. EG. If you need it to be accurate to within 1 second you will need to use a maximum 1 second timer.

Only other alternative i can think of is OnPlayerUpdate (which will be worse performance-wise than using a timer).

Timer duration depends on level of accuracy you need.

You could make a system that checks every 5 min or so, then when it gets to within 5 min start a 1 second timer (not worth the effort). I wouldn't bother though because calling gettime() once per second will be completely unnoticeable.
Reply


Messages In This Thread
Function to run on each hour - by Jonesy96 - 06.06.2016, 09:06
Re: Function to run on each hour - by blackeagle1122 - 06.06.2016, 09:36
Re: Function to run on each hour - by Nin9r - 06.06.2016, 09:53
Re: Function to run on each hour - by Jonesy96 - 06.06.2016, 10:10
Re: Function to run on each hour - by iggy1 - 06.06.2016, 10:22
Re: Function to run on each hour - by Abagail - 06.06.2016, 10:53
Re: Function to run on each hour - by Unte99 - 06.06.2016, 11:11
Re: Function to run on each hour - by Jonesy96 - 06.06.2016, 11:17

Forum Jump:


Users browsing this thread: 1 Guest(s)