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

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 Go to previous messageGo to previous message
dolik.rce is currently offline  dolik.rce
Messages: 1796
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

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
 
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: Add layout
Next Topic: Trouble with Socket
Goto Forum:
  


Current Time: Sat Oct 03 20:58:46 GMT+2 2026

Total time taken to generate the page: 0.01155 seconds