34 double Clock::_rating = 1.0;
36 struct timeval Clock::_offset;
37 bool Clock::_offset_init = false;
39 bool Clock::_modify_clock = false;
93 return getTime() + seconds_left;
105 return __getExpireTime(timestamp, lifetime);
110 return __getExpireTime(
getTime(), lifetime);
118 return timestamp + lifetime;
150 if (timestamp == 0)
return false;
173 return Clock::_offset;
180 if (!Clock::_offset_init)
182 timerclear(&Clock::_offset);
183 Clock::_offset_init =
true;
186 timeradd(&Clock::_offset, &tv, &Clock::_offset);
196 timersub(&now, &tv, &now);
213 if (!Clock::_offset_init)
215 timerclear(&Clock::_offset);
216 Clock::_offset_init =
true;
218 timersub(&now, tv, &Clock::_offset);
238 if (!Clock::_offset_init)
240 timerclear(&Clock::_offset);
241 Clock::_offset_init =
true;
245 timersub(tv, &Clock::_offset, tv);
257 if (!Clock::_offset_init)
259 timerclear(&Clock::_offset);
260 Clock::_offset_init =
true;
264 timersub(tv, &Clock::_offset, tv);
280 return static_cast<double>(val.tv_sec) + (static_cast<double>(val.tv_usec) / 1000000.0);