32 int Clock::_timezone = 0;
33 double Clock::_rating = 0;
34 bool Clock::_badclock =
false;
36 struct timeval Clock::_offset;
37 bool Clock::_offset_init = false;
39 bool Clock::_modify_clock = false;
111 return getTime() + seconds_left;
120 return __getExpireTime(timestamp, lifetime);
125 return __getExpireTime(
getTime(), lifetime);
132 if (
id.timestamp > expiretime)
return 0;
135 return id.timestamp - expiretime;
147 return timestamp + lifetime +
dtn::data::Number(static_cast<dtn::data::Size>(sigma_error));
163 return __isExpired(timestamp, lifetime);
208 return offset + now.tv_sec;
213 return Clock::_offset;
220 if (!Clock::_offset_init)
222 timerclear(&Clock::_offset);
223 Clock::_offset_init =
true;
225 timeradd(&Clock::_offset, &tv, &Clock::_offset);
235 timersub(&now, &tv, &now);
250 if (!Clock::_offset_init)
252 timerclear(&Clock::_offset);
253 Clock::_offset_init =
true;
255 timersub(&now, tv, &Clock::_offset);
273 if (!Clock::_offset_init)
275 timerclear(&Clock::_offset);
276 Clock::_offset_init =
true;
279 timersub(tv, &Clock::_offset, tv);
284 return static_cast<double>(val.tv_sec) + (static_cast<double>(val.tv_usec) / 1000000.0);