Example #1
0
static int
do_test (void)
{
  clockid_t cl;
  int result;

  result = clock_test (CLOCK_REALTIME);

  if (clock_getcpuclockid (0, &cl) == 0)
    /* XXX It's not yet a bug when this fails.  */
    clock_test (cl);
  else
	  printf("CPU clock unavailble, skipping test\n");

  return result;
}
static int
do_test (void)
{
  clockid_t cl;
  int result;

  result = clock_test (CLOCK_REALTIME);

  if (clock_getcpuclockid (0, &cl) == 0)
    /* XXX It's not yet a bug when this fails.  */
    clock_test (cl);

  result = clock_test (CLOCK_PROCESS_CPUTIME_ID);

  if (clock_getcpuclockid (0, &cl) == 0)
    /* XXX It's not yet a bug when this fails.  */
    clock_test (cl);

  return result;
}