示例#1
0
void test_millisecond()
{
  ulonglong t1= my_timer_milliseconds();
  ulonglong t2;
  int i;
  int backward= 0;
  int nonzero= 0;

  for (i=0 ; i < LOOP_COUNT ; i++)
  {
    t2= my_timer_milliseconds();
    if (t1 > t2)
      backward++;
    if (t2 != 0)
      nonzero++;
    t1= t2;
  }

  ok((backward == 0), "The millisecond timer is increasing");

  if (myt.milliseconds.routine != 0)
    ok((nonzero != 0), "The millisecond timer is implemented");
  else
    ok((nonzero == 0), "The millisecond timer is not implemented and returns 0");
}
示例#2
0
guint64 chassis_get_rel_milliseconds() {
    return my_timer_milliseconds();
}