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"
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:33
virtual void tick()
Definition: Engine.cc:14
Time and Date handling tools.
Definition: Engine.h:12
time_t ParseRfc1123(const char *)
Convert from RFC 1123 style time: "www, DD MMM YYYY hh:mm:ss ZZZ".
Definition: rfc1123.cc:153
const char * FormatStrf(time_t)
Definition: gadgets.cc:100
const char * FormatRfc1123(time_t)
Definition: rfc1123.cc:196
const char * FormatHttpd(time_t)
Definition: gadgets.cc:116
time_t ParseIso3307(const char *)
Convert from ISO 3307 style time: YYYYMMDDHHMMSS or YYYYMMDDHHMMSS.xxx.
Definition: iso3307.cc:18
STL namespace.
time_t squid_curtime
the current UNIX time in seconds
Definition: stub_libtime.cc:20
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)
Definition: stub_libtime.cc:19
time_t struct timeval STUB_RETVAL(0) double tvSubDsec(struct timeval
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:17
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

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors