Home » Community » Newbie corner » running program at different speeds
Re: running program at different speeds [message #37030 is a reply to message #37022] |
Fri, 10 August 2012 08:01   |
|
The simplest possible example is something like this:Quote: | #include <Core/Core.h>
using namespace Upp;
//must be compiled with MT flag
#include <Timer/Timer.h>
void SomeFn(){
Cout() << GetSysTime() << "\n";
}
CONSOLE_APP_MAIN{
// set up the periodic callback
Timer t;
t.SetTimeCallback(-500,callback(SomeFn));
// wait until the work is done
Sleep(5000);
}
|
The error you got was about passing wrong callback or something similar. Have a look at callbacks in U++ manual, they is many ways to work with them.
Honza
|
|
|
Goto Forum:
Current Time: Sun Jun 08 07:55:59 CEST 2025
Total time taken to generate the page: 0.04907 seconds
|