Exemplo n.º 1
0
void test_nanosecond()
{
  ulonglong t1= my_timer_nanoseconds();
  ulonglong t2;
  int i;
  int backward= 0;
  int nonzero= 0;

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

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

  if (myt.nanoseconds.routine != 0)
    ok((nonzero != 0), "The nanosecond timer is implemented");
  else
    ok((nonzero == 0), "The nanosecond timer is not implemented and returns 0");
}
Exemplo n.º 2
0
guint64 chassis_get_rel_nanoseconds() {
    return my_timer_nanoseconds();
}