What's The Standard Timer System Nowadays?

WolfieeifloW

WEHZ Helper
Reaction score
372
Hey there TH.net!
I've finally broken down, and am going to re-learn timers.

My current task, which is why I require a timer, is something like this:
A passive spell, where when the hero attacks, it has a chance to increase Strength for a short period.
Since there's no easy way of doing this with a spell, I've decided to just trigger it.

Now, my question.
What timer is the most efficient, while being quite user-friendly.

I remember back when I used to code a lot, I used TimerUtils.
But, as you probably know, now everyone and their mother wants to release their timer system.
So I'm just wondering what timer system is the standard nowadays?
 

luorax

Invasion in Duskwood
Reaction score
67
Well, I think TimerUtils is still efficient enough and user-friendly. I'd suggest you to use it.
 

emjlr3

Change can be a good thing
Reaction score
395
T32 is as fast as it gets, but has more limitations and will require more specific coding practices to use. If you're map gets really big it will eventually suffer from the op-limit

TimerUtils is user friendly and slower

A few more exist, but most, aside from TimerUtils, share the same limitations and burden of use as T32, so they aren't really worth mentioning

At the end of the day it really only matters which you want to use. They are all fast enough, given GCP (good coding practices).

People will argue that T32 is plenty user friendly, and it really is, with a few concessions, but nothing is easier then TimerUtils.

For longer intervals I use TimerUtils. For periodic intervals I tend to just use a struct stack and a timer/spell. While a marginally slower approach then T32 when multiple spells are running simultaneously, its more universally acceptable and cuts down on code bloat.

This could very well turn into a large system debate, once Nestherus and Bribe show up, but I don't think you can really argue much with the aforementioned.
 

tommerbob

Minecraft. :D
Reaction score
110
I'm definitely no expert, but I like TimerUtils. It's simple, easy-to-use, and gets the job done.
 

WolfieeifloW

WEHZ Helper
Reaction score
372
What's considered low/high frequency?
I remember TimerUtils being like 0.0325 I think?

Also, what's 'timeout'?
 

Solmyr

Ultra Cool Member
Reaction score
30
Timeout is the interval at which a timer expires. Low-frequency timers are those that don't expire frequently (used for stuff such as spell durations), while high-frequency are those that expire much more frequently (used for stuff such as moving units).

TimerUtils simply provides you with a way to recycle timers and attach data to them. You can specify the timeout as you wish. Timer32 uses a timeout of 0.03125 seconds by default.

Try reading this tutorial.
 

Magthridon96

Member
Reaction score
2
For loops, T32 is very efficient and lightweight.

TimerUtils may be useful too, but since you have to continuously call Get/SetTimerData to retrieve/set the instance of the struct, T32 definitely WINS here.
 

Romek

Super Moderator
Reaction score
963
It's all up to personal preference, really.
I'd recommend using T32 for high-frequency stuff (slides, projectiles, etc), and TimerUtils for everything else.
Each of them are as efficient as they get, for their uses.

> TimedLoop
Lol.
 

luorax

Invasion in Duskwood
Reaction score
67
For loops, T32 is very efficient and lightweight.

TimerUtils may be useful too, but since you have to continuously call Get/SetTimerData to retrieve/set the instance of the struct, T32 definitely WINS here.

T32 difinitely LOSES here. Check Romek's post (well, I was lazy to write it down before)
 

tooltiperror

Super Moderator
Reaction score
231
Do you understand what you are saying, luorax?

You seem to not understand T32 at all.
 

luorax

Invasion in Duskwood
Reaction score
67
Nope, I'm totally retarded. But I still don't know why should he use T32 to create a buff, that's removed after 5 seconds, without no periodic effect, or something like that.
 

Sevion

The DIY Ninja
Reaction score
424
Simple answer:

Use T32 for high frequency callbacks.

Use TimerUtils for low frequency callbacks.

End of Story.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top