Squid Web Cache master
Loading...
Searching...
No Matches
stub_libtime.cc
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2025 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"
18struct timeval current_time = {};
19double current_dtime = 0.0;
20time_t squid_curtime = 0;
22int tvSubUsec(struct timeval, struct timeval) STUB_RETVAL(0)
23double tvSubDsec(struct timeval, struct timeval) STUB_RETVAL(0.0)
24int tvSubMsec(struct timeval, struct timeval) STUB_RETVAL(0)
25void tvSub(struct timeval &, struct timeval const &, struct timeval const &) STUB
26void tvAdd(struct timeval &, struct timeval const &, struct timeval const &) STUB
27void tvAssignAdd(struct timeval &, struct timeval const &) STUB
28std::ostream &operator <<(std::ostream &os, const timeval &) STUB_RETVAL(os)
29namespace Time
30{
31time_t ParseIso3307(const char *) STUB_RETVAL(0)
32const char *FormatRfc1123(time_t) STUB_RETVAL("")
33time_t ParseRfc1123(const char *) STUB_RETVAL(0)
34const char *FormatStrf(time_t) STUB_RETVAL("")
35const char *FormatHttpd(time_t) STUB_RETVAL("")
36}
37
#define STUB
macro to stub a void function.
Definition STUB.h:34
#define STUB_RETVAL(x)
Definition STUB.h:42
virtual void tick()
Definition Engine.cc:14
Time and Date handling tools.
Definition Engine.h:12
STL namespace.
time_t squid_curtime
the current UNIX time in seconds
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 &
double current_dtime
the current UNIX time in seconds (with microsecond precision)
time_t getCurrentTime() STUB_RETVAL(0) int tvSubUsec(struct timeval
double tvSubDsec(struct timeval t1, struct timeval t2)
Definition gadgets.cc:44
void tvSub(struct timeval &res, struct timeval const &t1, struct timeval const &t2)
Definition gadgets.cc:58
int tvSubUsec(struct timeval t1, struct timeval t2)
Definition gadgets.cc:37
struct timeval current_time
the current UNIX time in timeval {seconds, microseconds} format
Definition gadgets.cc:18
void tvAssignAdd(struct timeval &t, struct timeval const &add)
Definition gadgets.cc:79
int tvSubMsec(struct timeval t1, struct timeval t2)
Definition gadgets.cc:51