Commit 172b1789 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Make Tim_format() take a double time argument


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2037 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent de8617e9
......@@ -46,7 +46,7 @@ uint32_t crc32(uint32_t crc, const void *p1, unsigned l);
uint32_t crc32_l(const void *p1, unsigned l);
/* from libvarnish/time.c */
void TIM_format(time_t t, char *p);
void TIM_format(double t, char *p);
time_t TIM_parse(const char *p);
double TIM_mono(void);
double TIM_real(void);
......
......@@ -87,11 +87,13 @@ TIM_real(void)
}
void
TIM_format(time_t t, char *p)
TIM_format(double t, char *p)
{
struct tm tm;
time_t tt;
gmtime_r(&t, &tm);
tt = (time_t) t;
gmtime_r(&tt, &tm);
strftime(p, 30, "%a, %d %b %Y %T GMT", &tm);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment