本文整理汇总了C++中Timers::Process方法的典型用法代码示例。如果您正苦于以下问题:C++ Timers::Process方法的具体用法?C++ Timers::Process怎么用?C++ Timers::Process使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timers
的用法示例。
在下文中一共展示了Timers::Process方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
void main()
{
/*CLoggingStream errors(L"errorLogs");
g_Scripts.reset(new Scripting::Scripts(errors,
"D:\\Development\\C++\\Phasor - Copy\\Release"));
g_Scripts->OpenScript("lua_test");
g_Scripts->OpenScript("lua_test1");
//Scripting::OpenScript("lua_test1");
Scripting::PhasorCaller caller;
caller.AddArg("hello");
Scripting::Result result = caller.Call("funca");
caller.AddArg("hello_again");
caller.Call("funca");
std::cout << result.size() << std::endl;
g_Scripts->CloseScript("lua_test");
g_Scripts->CloseScript("lua_test1");*/
/*PhasorThread thread;
thread.run();
std::unique_ptr<PhasorThreadEvent> e = TestEvent::Create(0);
thread.InvokeInAux(std::move(e));
for (int i =0; i < 100000; i++)
{
thread.ProcessEvents();
Sleep(5);
//if (count == 100) break;
}
thread.close();
while (!thread.has_closed()) {
Sleep(10);
}*/
Timers timers;
timer_t timer = TestTimer::Create(1000);
timers.AddTimer(std::move(timer));
timer_t timer1 = TestTimer1::Create(1000, timer->GetID());
timer_t timer2 = TestTimer1::Create(1000, timer1->GetID());
timers.AddTimer(std::move(timer2));
timers.AddTimer(std::move(timer1));
while (1)
{
timers.Process();
Sleep(20);
}
}