cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Developer forum

Call the C++ API continuously every x minutes

BenjiDev
Booster

I'm looking for some way to use the C++ API (like opening a dialog or creating a wall element) on a timer basis.

Something along the lines of when the addon is loaded register a callback (lambda/function pointer)  that runs some functionality every minute.

 

Otherwise I'm thinking of spawning a thread in RegisterInterface that wakes up every minute and does what i want. But I don't think the C++ API likes being used from a separate thread... 

 

 

1 ACCEPTED SOLUTION
1 REPLY 1

Solution
BenjiDev
Booster

I stumbled across the GS::MessageLoopExectuor class, looks like it can be useful to run heavy tasks without freezing up the UI. It also has some "Wait" methods that looks like something i can use. 

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!