MARK CALLAGHAN wrote:
1) Is the gettimeofday() function reliable and fast on Solaris?  If so,
there really is no need to use gethrtime() here...

On some Linux kernels that I have used gettimeofday() fails
intermittently for reasons other than those listed in the man page.
The code in my_getsystime.c does not check the return value for the
getimeofday() call.

Kind of. It uses the following, possibly infinite loop: :(

  uint64_t newtime;
  struct timeval t;
  /*
The following loop is here because gettimeofday may fail on some systems
  */
  while (gettimeofday(&t, NULL) != 0)
  {}
  *time_arg= t.tv_sec;
  newtime= (uint64_t)t.tv_sec * 1000000 + t.tv_usec;
  return newtime;

-jay

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to