/* DEBUG: section 21 Time Functions */
#include "squid.h"
-#include "SquidTime.h"
+#include "time/gadgets.h"
#include <iomanip>
#include <ostream>
time_t squid_curtime = 0;
time_t
-getCurrentTime(void)
+getCurrentTime()
{
#if GETTIMEOFDAY_NO_TZP
gettimeofday(¤t_time);
return squid_curtime = current_time.tv_sec;
}
+int
+tvSubUsec(struct timeval t1, struct timeval t2)
+{
+ return (t2.tv_sec - t1.tv_sec) * 1000000 +
+ (t2.tv_usec - t1.tv_usec);
+}
+
+double
+tvSubDsec(struct timeval t1, struct timeval t2)
+{
+ return (double) (t2.tv_sec - t1.tv_sec) +
+ (double) (t2.tv_usec - t1.tv_usec) / 1000000.0;
+}
+
int
tvSubMsec(struct timeval t1, struct timeval t2)
{
}
}
-TimeEngine::~TimeEngine()
-{}
-
-void
-TimeEngine::tick()
-{
- getCurrentTime();
-}
-
std::ostream &
operator <<(std::ostream &os, const timeval &t)
{