I would imagine calling it every 500ms would be best. Then you wouldn't have to wait for the next event.
Regards,
Brandon
|
I'm making a global event system for my server, so I'm making the events called on server startup and then are run for every player (for stuff like announcments, etc). I was wondering, which would be more efficient, make one event that checks every 500 ms and put all things even if they have different timings in it, or have a different event for every timing, like one event for 20000ms one for 5000ms one for 1000ms etc.
I would imagine calling it every 500ms would be best. Then you wouldn't have to wait for the next event.
Regards,
Brandon
I'd image 500ms because that only needs one event and for the others, you would need three events, plus for the 500 one, you don't really do anything 60% of the time
Well, honestly, you could do the 20 seconds way for less CPU, but in return you would get less quality of handling.
Regards,
Brandon
Depend of what event at 500ms and what event at 1000ms , is a good thing you made events so Good Luck I prefer at 500ms
You guys seem to have no clue what you are talking about.
Which would use less CPU load, running one event, at a delay of 500ms globaly, that checks everything, kind of like process only in an event form, or having multiple events such as, one at 500ms, one at 3000ms one at 50000ms etc, etc. If I did the latter it wouldn't have to use the CPU power to go through all the "if" statements, but it would also be running more than one event.
I will probably end up using the multiple events idea.
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |