Jump to content

_Timer_SetTimer and AdlibRegister


Recommended Posts

Are these two functions exactly the same in performing a "func" periodically?

Am I correct that I can set multiple _Timer_SetTimer for a single "func" - to perform at different "time-intervals" whereas AdLibRegister is only a single timer?

Any other difference?

Thanks

Dan

Link to comment
Share on other sites

you're right in your observation. I would try both. See the timing, memory use, etc. and use one or the other. I personally use AdLib only. Not all DLL call is better than AutoIt native. At times ... for example, WinGetPos() is way faster than the WinAPI counterpart.  I use all native func unless it'll not do. Then again, you'll have to evaluate what you find best  fit your code.

12 minutes ago, Burgaud said:

Any other difference?

not really. Use at will :) 

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

On 6/25/2020 at 7:57 PM, argumentum said:

 

On 6/25/2020 at 7:44 PM, Burgaud said:

Any other difference?

not really. Use at will :) 

I owe you an apology. My assumption was based due to inexperience with timers.

The only way to have a reliable timer is with WM_TIMER.
So use Adlib unless, you must stop the world. Then, if you must, use _WinAPI_SetTimer/_WinAPI_KillTimer with WM_TIMER as shown in the link above.
The reason is described here.

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...