|
Squid Web Cache master
|
#include <ctime>#include <iosfwd>Go to the source code of this file.
Namespaces | |
| namespace | Time |
| Time and Date handling tools. | |
Typedefs | |
| typedef uint64_t | time_msec_t |
Functions | |
| time_t | getCurrentTime () |
| time_t | Time::ParseIso3307 (const char *) |
| Convert from ISO 3307 style time: YYYYMMDDHHMMSS or YYYYMMDDHHMMSS.xxx. | |
| const char * | Time::FormatRfc1123 (time_t) |
| time_t | Time::ParseRfc1123 (const char *) |
| Convert from RFC 1123 style time: "www, DD MMM YYYY hh:mm:ss ZZZ". | |
| const char * | Time::FormatStrf (time_t) |
| const char * | Time::FormatHttpd (time_t) |
| int | tvSubUsec (struct timeval A, struct timeval B) |
| double | tvSubDsec (struct timeval A, struct timeval B) |
| int | tvSubMsec (struct timeval A, struct timeval B) |
| void | tvSub (struct timeval &res, struct timeval const &t1, struct timeval const &t2) |
| void | tvAdd (struct timeval &res, struct timeval const &t1, struct timeval const &t2) |
| void | tvAssignAdd (struct timeval &t, struct timeval const &add) |
| long int | tvToMsec (struct timeval &t) |
| std::ostream & | operator<< (std::ostream &, const timeval &) |
| prints <seconds>.<microseconds> | |
| bool | operator< (const timeval &a, const timeval &b) |
| bool | operator> (const timeval &a, const timeval &b) |
| bool | operator!= (const timeval &a, const timeval &b) |
| bool | operator<= (const timeval &a, const timeval &b) |
| bool | operator>= (const timeval &a, const timeval &b) |
| bool | operator== (const timeval &a, const timeval &b) |
Variables | |
| double | current_dtime |
| the current UNIX time in seconds (with microsecond precision) | |
| time_t | squid_curtime |
| the current UNIX time in seconds | |
| struct timeval | current_time |
| the current UNIX time in timeval {seconds, microseconds} format | |
| typedef uint64_t time_msec_t |
| time_t getCurrentTime | ( | ) |
Update squid_curtime (also current_time, and current_dtime)
Definition at line 23 of file gadgets.cc.
References current_dtime, current_time, double, and squid_curtime.
Referenced by BandwidthBucket::BandwidthBucket(), DebugMessageHeader::DebugMessageHeader(), IcmpSquid::Close(), Helper::SessionBase::closePipesSafely(), Helper::SessionBase::closeWritePipeSafely(), comm_check_incoming_poll_handlers(), comm_check_incoming_select_handlers(), Fs::Ufs::UFSSwapDir::createDirectory(), IpcIoFile::DiskerHandleRequests(), Comm::DoSelect(), DelayPools::Init(), ipc_thread_1(), Rock::Rebuild::loadingSteps(), main(), netdbReloadState(), netdbSaveState(), IcmpPinger::Open(), Helper::Client::openSessions(), statefulhelper::openSessions(), Fs::Ufs::RebuildState::rebuildStep(), SquidMain(), storeDirWriteCleanLogs(), Time::Engine::tick(), unlinkdClose(), Rock::Rebuild::validationSteps(), and watch_child().
|
inline |
|
inline |
| std::ostream & operator<< | ( | std::ostream & | os, |
| const timeval & | t | ||
| ) |
Definition at line 28 of file stub_libtime.cc.
References STUB_RETVAL.
|
inline |
|
inline |
|
inline |
|
inline |
| void tvAdd | ( | struct timeval & | res, |
| struct timeval const & | t1, | ||
| struct timeval const & | t2 | ||
| ) |
| void tvAssignAdd | ( | struct timeval & | t, |
| struct timeval const & | add | ||
| ) |
timeval addition assignment operation
| [out] | t | += add |
Definition at line 79 of file gadgets.cc.
Referenced by Adaptation::Icap::History::processingTime(), and Adaptation::Icap::History::stop().
| void tvSub | ( | struct timeval & | res, |
| struct timeval const & | t1, | ||
| struct timeval const & | t2 | ||
| ) |
timeval subtraction operation
| [out] | res | = t2 - t1 |
Definition at line 58 of file gadgets.cc.
Referenced by Adaptation::Icap::History::currentTime(), Adaptation::Icap::Xaction::finalizeLogInfo(), ClientHttpRequest::logRequest(), HierarchyLogEntry::peerResponseTime(), and IpcIoMsg::stat().
| double tvSubDsec | ( | struct timeval | A, |
| struct timeval | B | ||
| ) |
timeval subtraction operation.
Definition at line 44 of file gadgets.cc.
Referenced by cacheResetDigest(), GetAvgStat(), GetCountersStats(), GetInfo(), idnsCheckQueue(), idnsStats(), snmp_prfSysFn(), snmp_sysFn(), PeerSelectorPingMonitor::startWaiting(), statAvgTick(), statClientRequests(), statCPUUsage(), storeDirWriteCleanLogs(), and storeRebuildComplete().
| int tvSubMsec | ( | struct timeval | A, |
| struct timeval | B | ||
| ) |
timeval subtraction operation.
Definition at line 51 of file gadgets.cc.
Referenced by IpCacheLookupForwarder::additionalLookupDelay(), fqdncache_entry::age(), IpcIoFile::canWait(), IpcIoFile::DiskerHandleRequests(), PeerSelector::handleHtcpParentMiss(), PeerSelector::handleIcpParentMiss(), helperReturnBuffer(), helperStatefulHandleRead(), idnsCheckQueue(), Rock::Rebuild::loadingSteps(), neighborUpdateRtt(), netdbReloadState(), netdbSaveState(), Helper::Client::packStatsInto(), peerCountHandleIcpReply(), Fs::Ufs::RebuildState::rebuildStep(), Icmp4::Recv(), Icmp6::Recv(), Adaptation::History::Entry::rptm(), IpCacheLookupForwarder::totalResponseTime(), ClientHttpRequest::updateCounters(), Rock::Rebuild::validationSteps(), and IpcIoFile::WaitBeforePop().
| int tvSubUsec | ( | struct timeval | A, |
| struct timeval | B | ||
| ) |
timeval subtraction operation.
Definition at line 37 of file gadgets.cc.
Referenced by clientUpdateHierCounters(), and icpUdpSendQueue().
|
inline |
Convert timeval to milliseconds XXX: result is not compatible with time_msec_t millisecond storage
Definition at line 93 of file gadgets.h.
Referenced by Format::Format::assemble(), Adaptation::Icap::History::processingTime(), Log::Format::SquidIcap(), Log::Format::SquidNative(), Adaptation::Icap::History::start(), and Adaptation::Icap::History::stop().
|
extern |
Definition at line 19 of file stub_libtime.cc.
Referenced by BandwidthBucket::BandwidthBucket(), FadingCounter::clear(), FadingCounter::count(), EventScheduler::dump(), DumpMallocStatistics(), getCurrentTime(), HappyConnOpener::maybeOpenPrimeConnection(), SpareAllowanceGiver::recordAllowance(), BandwidthBucket::refillBucket(), Mem::Report(), EventScheduler::schedule(), ClientInfo::setWriteLimiter(), HappyOrderEnforcer::startedWaiting(), and EventScheduler::timeRemaining().
|
extern |
Definition at line 18 of file gadgets.cc.
Referenced by ClientHttpRequest::ClientHttpRequest(), DebugMessageHeader::DebugMessageHeader(), Fs::Ufs::RebuildState::RebuildState(), Adaptation::Icap::Xaction::Xaction(), IpCacheLookupForwarder::additionalLookupDelay(), fqdncache_entry::age(), Format::Format::assemble(), authDigestNonceIsStale(), authenticateDigestNonceCacheCleanup(), authenticateDigestNonceNew(), IpcIoFile::canWait(), Auth::CredentialsCache::cleanup(), StoreEntry::complete(), Adaptation::Icap::History::currentTime(), IpcIoFile::DiskerHandleRequests(), Adaptation::Icap::Xaction::finalizeLogInfo(), IpCacheLookupForwarder::forwardLookup(), fqdncache_nbgethostbyaddr(), GetCountersStats(), getCurrentTime(), GetInfo(), Adaptation::Icap::ModXact::handleCommRead(), Adaptation::Icap::OptXact::handleCommRead(), PeerSelector::handleHtcpParentMiss(), PeerSelector::handleIcpParentMiss(), helperDispatch(), helperReturnBuffer(), helperStatefulDispatch(), helperStatefulHandleRead(), htcpSyncAle(), icpSyncAle(), icpUdpSend(), icpUdpSendQueue(), idnsCheckQueue(), idnsSendQuery(), idnsStartQuery(), idnsStats(), Rock::Rebuild::loadingSteps(), Icmp::Log(), ClientHttpRequest::logRequest(), IpCacheLookupForwarder::lookupsStarting(), neighborsUdpPing(), neighborUpdateRtt(), netdbReloadState(), netdbSaveState(), HierarchyLogEntry::notePeerRead(), HierarchyLogEntry::notePeerWrite(), PeerSelectorPingMonitor::noteWaitOver(), Helper::Client::packStatsInto(), peerCountHandleIcpReply(), peerCountMcastPeersCreateAndSend(), peerSelect(), ConnStateData::postHttpsAccept(), IpcIoFile::push(), Fs::Ufs::RebuildState::rebuildStep(), PeerSelector::resolveSelected(), Adaptation::History::Entry::rptm(), PeerSelector::selectSomeNeighbor(), Icmp4::SendEcho(), Icmp6::SendEcho(), snmp_prfSysFn(), snmp_sysFn(), Log::Format::SquidIcap(), SquidMain(), Log::Format::SquidNative(), Log::Format::SquidReferer(), Adaptation::Ecap::XactionRep::start(), Rock::Rebuild::start(), Adaptation::Icap::History::start(), Adaptation::Icap::ModXact::startShoveling(), Adaptation::Icap::OptXact::startShoveling(), PeerSelectorPingMonitor::startWaiting(), IpcIoMsg::stat(), statAvgTick(), statClientRequests(), storeDirWriteCleanLogs(), storeLog(), storeRebuildComplete(), IpCacheLookupForwarder::totalResponseTime(), ClientHttpRequest::updateCounters(), Rock::Rebuild::validationSteps(), and IpcIoFile::WaitBeforePop().
|
extern |
Definition at line 20 of file stub_libtime.cc.
Referenced by getCurrentTime().