tests/shared/browser/main_message_loop_external_pump_linux.cc
// Return a timeout suitable for the glib loop, -1 to block forever,
// 0 to return right away, or a timeout in milliseconds from now.
Return a timeout suitable for the glib loop, -1 to block forever,
0 to return right away, or a timeout in milliseconds from now.
Return a timeout suitable for the glib loop - 1 to block forever 0 to return right away or a timeout in milliseconds from now .
int GetTimeIntervalMilliseconds(const CefTime& from) {
  if (from.GetDoubleT() == 0.0)
    return -1;
  CefTime now;
  now.Now();
  int delay =
      static_cast<int>(ceil((from.GetDoubleT() - now.GetDoubleT()) * 1000.0));
  return delay < 0 ? 0 : delay;
}
int GetTimeIntervalMilliseconds ( const CefTime & from ) { if ( from . GetDoubleT ( ) == 0.0 ) return -1 ; CefTime now ; now . Now ( ) ; int delay = static_cast < int > ( ceil ( ( from . GetDoubleT ( ) - now . GetDoubleT ( ) ) * 1000.0 ) ) ; return delay < 0 ? 0 : delay ; }
Return a timeout suitable for the glib loop, -1 to block forever,
0 to return right away, or a timeout in milliseconds from now.
Return a timeout suitable for the glib loop - 1 to block forever 0 to return right away or a timeout in milliseconds from now .
// Be careful here. CefTime has a precision of microseconds, but we want a // value in milliseconds. If there are 5.5ms left, should the delay be 5 or // 6?  It should be 6 to avoid executing delayed work too early. // If this value is negative, then we need to run delayed work soon.