Jump to content
Sign in to follow this  
ACS

AdlibEnable vs _Timer_SetTimer

Recommended Posts

ACS

I'm wondering which function is better to use: AdlibEnable or the UDF _Timer_SetTimer.

It seems to me the main difference is that AdlibEnable is only for a single timer, whereas with the UDF you can initiate multiple timers. Since I only need one timer, does one function provide an advantage over the other?

I plan to call the function every second, so I can accurately keep up with the system clock.

Share this post


Link to post
Share on other sites
Authenticity

In your case I'd go with the embedded function AdlibEnable.

Share this post


Link to post
Share on other sites
ACS

Any particular (technical) reason you chose that?

Share this post


Link to post
Share on other sites
Authenticity

Technically, yes, I don't see any reason for overhead. But it's depended on your needs. If you need to differentiate between multiple timers ID then it makes sense to use _Timer_SetTimer(), even if you just use one timer but need to attach it to a window or the parameters it passes to your function then yes. If you don't need neither, like multiple timers or the parameters then I see no reason to use it over using EnableAdlib().

Share this post


Link to post
Share on other sites
ACS

Ok, thanks!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×