Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Callbacks and Timers » TimerCallBack interval resolution
Re: TimerCallBack interval resolution [message #59484 is a reply to message #58047] Wed, 04 January 2023 20:19 Go to previous messageGo to previous message
superdev is currently offline  superdev
Messages: 20
Registered: August 2022
Promising Member
mirek wrote on Mon, 24 January 2022 10:47
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)

So how to combine UPP GUI(Ctrl) and SDL2 window (>100 FPS)?
I've tried TopWindow::OpenMain(), then ProcessEvents and render in loop. It works but the loop freezes, for example during TopWindow resizing, dialog showing.


Win7x64, upp-win-17059

[Updated on: Wed, 04 January 2023 20:25]

Report message to a moderator

 
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: Fri May 03 23:36:10 CEST 2024

Total time taken to generate the page: 0.02069 seconds