当前位置: 首页>>代码示例>>C++>>正文


C++ Timer::GetInterval方法代码示例

本文整理汇总了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;
}
开发者ID:Tarnyko,项目名称:dali-adaptor,代码行数:13,代码来源:utc-Dali-Timer.cpp

示例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;
}
开发者ID:Tarnyko,项目名称:dali-adaptor,代码行数:13,代码来源:utc-Dali-Timer.cpp

示例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;
}
开发者ID:Tarnyko,项目名称:dali-adaptor,代码行数:28,代码来源:utc-Dali-Timer.cpp

示例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;
}
开发者ID:Tarnyko,项目名称:dali-adaptor,代码行数:17,代码来源:utc-Dali-Timer.cpp

示例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);
		}
	}
}
开发者ID:WindowsUser,项目名称:inspircd,代码行数:20,代码来源:timer.cpp

示例6: PrintTimer

// void PrintTimer(Timer &t) won't work.
void PrintTimer(Timer t)
{
    cout << t.GetInterval() << endl;
}
开发者ID:jollywing,项目名称:jolly-code-snippets,代码行数:5,代码来源:TestExplicit.cpp


注:本文中的Timer::GetInterval方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。