printf("NS_TimeToNextTimeout() lives!\n");
PRINTF("NS_TimeToNextTimeout() lives!\n");
int NS_TimeToNextTimeout(struct timeval *aTimer) {#ifndef MOZ_MONOLITHIC_TOOLKIT  static int once = 1;  if (once)  {    once = 0;    printf("NS_TimeToNextTimeout() lives!\n");  }#endif /* !MOZ_MONOLITHIC_TOOLKIT */    nsTimerXlib *timer;  // Find the next timeout.    if (nsTimerXlib::gHighestList->Count() > 0)    timer = (nsTimerXlib*)nsTimerXlib::gHighestList->ElementAt(0);  else    if (nsTimerXlib::gHighList->Count() > 0)      timer = (nsTimerXlib*)nsTimerXlib::gHighList->ElementAt(0);    else      if (nsTimerXlib::gNormalList->Count() > 0)        timer = (nsTimerXlib*)nsTimerXlib::gNormalList->ElementAt(0);      else        if (nsTimerXlib::gLowList->Count() > 0)          timer = (nsTimerXlib*)nsTimerXlib::gLowList->ElementAt(0);        else          if (nsTimerXlib::gLowestList->Count() > 0)            timer = (nsTimerXlib*)nsTimerXlib::gLowestList->ElementAt(0);          else            timer = NULL;      if (timer) {    if ((timer->mFireTime.tv_sec < aTimer->tv_sec) ||        ((timer->mFireTime.tv_sec == aTimer->tv_sec) &&         (timer->mFireTime.tv_usec <= aTimer->tv_usec))) {      aTimer->tv_sec = 0;      aTimer->tv_usec = 0;      return 1;    }    else {      if (aTimer->tv_sec < timer->mFireTime.tv_sec)        aTimer->tv_sec = timer->mFireTime.tv_sec - aTimer->tv_sec;      else         aTimer->tv_sec = 0;      // handle the overflow case      if (aTimer->tv_usec < timer->mFireTime.tv_usec) {        aTimer->tv_usec = timer->mFireTime.tv_usec - aTimer->tv_usec;        // make sure we don't go past zero when we decrement        if (aTimer->tv_sec)          aTimer->tv_sec--;      }      else {        aTimer->tv_usec -= timer->mFireTime.tv_usec;      }      return 1;    }  }  else {    return 0;  }}