#include "TTimer.h" #include #include #include void testTimer(){ TTimer *timer = new TTimer(1000); timer->SetCommand("Update2()"); timer->TurnOn(); } int evNo = 0; void Update2(){ evNo++; std::cout<<"Ev No : "<< evNo << std::endl; } #ifndef __CINT__ int main(){ gROOT->Reset(); TApplication *fApp = new TApplication("Test", NULL, NULL); testTimer(); fApp->Run(); return 0; } #endif