U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » U++ Callbacks and Timers » TimerCallBack interval resolution
Re: TimerCallBack interval resolution [message #58047 is a reply to message #58046] Mon, 24 January 2022 10:47 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
deep wrote on Mon, 24 January 2022 09:56
Hi Mirek,

Thanks for explanation.

I was under impression that SetTimeCallback/TimeCallback as independent time trigger.

mirek wrote on Sun, 23 January 2022 00:02


It is supposed to be about 20ms by design and it is not even guaranteed. If you need more precise timing, you need to run it in separate thread.



Small code snippet or link will be helpful to setup repeat callback independent of GUI.


Frankly, the only time I did that was in SDL2 based sound synthetiser and there the period is set by SDL2 sound system.

Still, you can check it here:

https://github.com/ultimatepp/ultimatepp/blob/master/example s/Synth/Core.cpp

(or in examples/SDLSoundDemo)
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to do to stop progress zip file ?
Goto Forum:
  


Current Time: Wed Oct 28 05:21:49 GMT+1 2026

Total time taken to generate the page: 0.00740 seconds