Project

General

Profile

Bug #1155 ยป timer.cpp

Boris Nagaev, 02/06/2012 02:11 PM

 

#include <Wt/WApplication>
#include <Wt/WContainerWidget>
#include <Wt/WTimer>

using namespace Wt;

class App : public WApplication {
public:
App(const WEnvironment& env):
WApplication(env) {
Wt::WTimer *timer = new Wt::WTimer(root());
timer->setInterval(3 * 1000);
timer->start();
timer->timeout().connect(this, &App::f);
}

void f()
{ }
};

WApplication* createApplication(const WEnvironment& env) {
return new App(env);
}

int main(int argc, char** argv) {
return WRun(argc, argv, &createApplication);
}

    (1-1/1)