#include <Clock.h>
Public Member Functions | |
| Clock () | |
| virtual | ~Clock () |
Static Public Member Functions | |
| static size_t | getTime () |
| static bool | isExpired (size_t timestamp, size_t lifetime=0) |
| static size_t | getExpireTime (size_t timestamp, size_t lifetime) |
Static Public Attributes | |
| static int | timezone = 0 |
| static u_int32_t | TIMEVAL_CONVERSION = 946684800 |
| static float | quality = 0 |
Definition at line 17 of file Clock.h.
| size_t dtn::utils::Clock::getExpireTime | ( | size_t | timestamp, | |
| size_t | lifetime | |||
| ) | [static] |
| size_t dtn::utils::Clock::getTime | ( | ) | [static] |
Definition at line 65 of file Clock.cpp.
References TIMEVAL_CONVERSION, and timezone.
Referenced by isExpired(), dtn::data::PrimaryBlock::PrimaryBlock(), dtn::core::BundleCore::raiseEvent(), dtn::data::PrimaryBlock::relabel(), dtn::data::DTNTime::set(), dtn::core::WallClock::timeout(), dtn::routing::NeighborDatabase::NeighborEntry::updateBundles(), and dtn::routing::NeighborDatabase::NeighborEntry::updateLastSeen().
| bool dtn::utils::Clock::isExpired | ( | size_t | timestamp, | |
| size_t | lifetime = 0 | |||
| ) | [static] |
float dtn::utils::Clock::quality = 0 [static] |
Defines an estimation about the precision of the local time. If the clock is definitely wrong the value is zero and one when we have a perfect time sync. Everything between one and zero gives an abstract knowledge about the quality of time.
Definition at line 38 of file Clock.h.
Referenced by dtn::data::BundleList::expire(), getExpireTime(), isExpired(), and dtn::core::BundleCore::raiseEvent().
u_int32_t dtn::utils::Clock::TIMEVAL_CONVERSION = 946684800 [static] |
int dtn::utils::Clock::timezone = 0 [static] |
Definition at line 29 of file Clock.h.
Referenced by getTime(), and setGlobalVars().
1.7.1