9#ifndef SQUID_SRC_TIME_GADGETS_H
10#define SQUID_SRC_TIME_GADGETS_H
68int tvSubUsec(
struct timeval A,
struct timeval B);
72double tvSubDsec(
struct timeval A,
struct timeval B);
77int tvSubMsec(
struct timeval A,
struct timeval B);
81void tvSub(
struct timeval &res,
struct timeval
const &t1,
struct timeval
const &t2);
85void tvAdd(
struct timeval &res,
struct timeval
const &t1,
struct timeval
const &t2);
89void tvAssignAdd(
struct timeval &t,
struct timeval
const &add);
95 return t.tv_sec * 1000 + t.tv_usec / 1000;
99std::ostream &
operator <<(std::ostream &,
const timeval &);
Time and Date handling tools.
time_t ParseRfc1123(const char *)
Convert from RFC 1123 style time: "www, DD MMM YYYY hh:mm:ss ZZZ".
const char * FormatStrf(time_t)
const char * FormatRfc1123(time_t)
const char * FormatHttpd(time_t)
time_t ParseIso3307(const char *)
Convert from ISO 3307 style time: YYYYMMDDHHMMSS or YYYYMMDDHHMMSS.xxx.
#define timercmp(tvp, uvp, cmp)
void tvAdd(struct timeval &res, struct timeval const &t1, struct timeval const &t2)
time_t squid_curtime
the current UNIX time in seconds
bool operator>=(const timeval &a, const timeval &b)
void tvSub(struct timeval &res, struct timeval const &t1, struct timeval const &t2)
bool operator==(const timeval &a, const timeval &b)
struct timeval current_time
the current UNIX time in timeval {seconds, microseconds} format
bool operator<(const timeval &a, const timeval &b)
double current_dtime
the current UNIX time in seconds (with microsecond precision)
int tvSubUsec(struct timeval A, struct timeval B)
int tvSubMsec(struct timeval A, struct timeval B)
bool operator!=(const timeval &a, const timeval &b)
bool operator<=(const timeval &a, const timeval &b)
long int tvToMsec(struct timeval &t)
bool operator>(const timeval &a, const timeval &b)
void tvAssignAdd(struct timeval &t, struct timeval const &add)
std::ostream & operator<<(std::ostream &, const timeval &)
prints <seconds>.<microseconds>
double tvSubDsec(struct timeval A, struct timeval B)