本文整理汇总了C++中Timer::GetInterval方法的典型用法代码示例。如果您正苦于以下问题:C++ Timer::GetInterval方法的具体用法?C++ Timer::GetInterval怎么用?C++ Timer::GetInterval使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Timer
的用法示例。
在下文中一共展示了Timer::GetInterval方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UtcDaliTimerSetInterval
int UtcDaliTimerSetInterval(void)
{
tet_printf("timer set interval \n");
Timer timer = Timer::New(10);
DALI_TEST_CHECK( timer.GetInterval() == 10);
timer.SetInterval(5000);
DALI_TEST_CHECK( timer.GetInterval() == 5000);
END_TEST;
}
示例2: UtcDaliTimerCreation
// Positive test case for a method
int UtcDaliTimerCreation(void)
{
// TestApplication application;
tet_printf("timer creation \n");
Timer timer = Timer::New(300);
DALI_TEST_CHECK( timer );
DALI_TEST_CHECK( timer.GetInterval() == 300);
END_TEST;
}
示例3: UtcDaliTimerAssignmentOperator
int UtcDaliTimerAssignmentOperator(void)
{
tet_printf("assignmnet constructor \n");
Timer timer = Timer::New(10);
DALI_TEST_CHECK( timer );
Timer anotherTimer = Timer::New(40);
DALI_TEST_CHECK(anotherTimer.GetInterval() == 40);
tet_printf("timer 1 interval %d, \n",anotherTimer.GetInterval());
tet_printf("timer 2 interval %d, \n",timer.GetInterval());
DALI_TEST_CHECK(timer != anotherTimer);
timer = anotherTimer;
DALI_TEST_CHECK(timer == anotherTimer);
tet_printf("timer 1 interval %d, \n",timer.GetInterval());
tet_printf("timer 2 interval %d, \n",anotherTimer.GetInterval());
DALI_TEST_CHECK(timer.GetInterval() == 40);
END_TEST;
}
示例4: UtcDaliTimerUnitializedGetInterval
int UtcDaliTimerUnitializedGetInterval(void)
{
tet_printf("unintialized get interval \n");
Timer *timer = new Timer;
DALI_TEST_CHECK(timer != NULL);
try
{
timer->GetInterval();
}
catch(Dali::DaliException& e)
{
DALI_TEST_ASSERT(e, "timer", TEST_LOCATION);
}
END_TEST;
}
示例5: TickTimers
void TimerManager::TickTimers(time_t TIME)
{
for (TimerMap::iterator i = Timers.begin(); i != Timers.end(); )
{
Timer* t = i->second;
if (t->GetTrigger() > TIME)
break;
Timers.erase(i++);
if (!t->Tick(TIME))
continue;
if (t->GetRepeat())
{
t->SetTrigger(TIME + t->GetInterval());
AddTimer(t);
}
}
}
示例6: PrintTimer
// void PrintTimer(Timer &t) won't work.
void PrintTimer(Timer t)
{
cout << t.GetInterval() << endl;
}