stub_libtime.cc
Go to the documentation of this file.
1 /*
2  * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3  *
4  * Squid software is distributed under GPLv2+ license and includes
5  * contributions from numerous individuals and organizations.
6  * Please see the COPYING and CONTRIBUTORS files for details.
7  */
8 
9 #include "squid.h"
10 
11 #define STUB_API "time/libtime.la"
12 #include "tests/STUB.h"
13 
14 #include "time/Engine.h"
16 
17 #include "time/gadgets.h"
18 struct timeval current_time = {};
19 double current_dtime = 0.0;
20 time_t squid_curtime = 0;
21 time_t getCurrentTime() STUB_RETVAL(0)
22 int tvSubUsec(struct timeval, struct timeval) STUB_RETVAL(0)
23 double tvSubDsec(struct timeval, struct timeval) STUB_RETVAL(0.0)
24 int tvSubMsec(struct timeval, struct timeval) STUB_RETVAL(0)
25 void tvSub(struct timeval &, struct timeval const &, struct timeval const &) STUB
26 void tvAdd(struct timeval &, struct timeval const &, struct timeval const &) STUB
27 void tvAssignAdd(struct timeval &, struct timeval const &) STUB
28 std::ostream &operator <<(std::ostream &os, const timeval &) STUB_RETVAL(os)
29 namespace Time
30 {
31 time_t ParseIso3307(const char *) STUB_RETVAL(0)
32 const char *FormatRfc1123(time_t) STUB_RETVAL("")
33 time_t ParseRfc1123(const char *) STUB_RETVAL(0)
34 const char *FormatStrf(time_t) STUB_RETVAL("")
35 const char *FormatHttpd(time_t) STUB_RETVAL("")
36 }
37 
double current_dtime
the current UNIX time in seconds (with microsecond precision)
Definition: stub_libtime.cc:19
double tvSubDsec(struct timeval t1, struct timeval t2)
Definition: gadgets.cc:44
time_t struct timeval STUB_RETVAL(0) double tvSubDsec(struct timeval
void tvAssignAdd(struct timeval &t, struct timeval const &add)
Definition: gadgets.cc:79
virtual void tick()
Definition: Engine.cc:14
time_t ParseRfc1123(const char *)
Convert from RFC 1123 style time: "www, DD MMM YYYY hh:mm:ss ZZZ".
Definition: rfc1123.cc:159
int tvSubMsec(struct timeval t1, struct timeval t2)
Definition: gadgets.cc:51
const char * FormatHttpd(time_t)
Definition: gadgets.cc:116
const char * FormatRfc1123(time_t)
Definition: rfc1123.cc:202
struct timeval current_time
the current UNIX time in timeval {seconds, microseconds} format
Definition: gadgets.cc:18
time_t getCurrentTime() STUB_RETVAL(0) int tvSubUsec(struct timeval
Time and Date handling tools.
Definition: Engine.h:12
#define STUB
macro to stub a void function.
Definition: STUB.h:34
int tvSubUsec(struct timeval t1, struct timeval t2)
Definition: gadgets.cc:37
time_t struct timeval struct timeval struct timeval struct timeval const struct timeval const &STUB void tvAdd(struct timeval &, struct timeval const &, struct timeval const &) STUB void tvAssignAdd(struct timeval &
const char * FormatStrf(time_t)
Definition: gadgets.cc:100
time_t squid_curtime
the current UNIX time in seconds
Definition: stub_libtime.cc:20
time_t ParseIso3307(const char *)
Convert from ISO 3307 style time: YYYYMMDDHHMMSS or YYYYMMDDHHMMSS.xxx.
Definition: iso3307.cc:18
void tvSub(struct timeval &res, struct timeval const &t1, struct timeval const &t2)
Definition: gadgets.cc:58

 

Introduction

Documentation

Support

Miscellaneous