Commit 8e540d38 authored by Nils Goroll's avatar Nils Goroll

sync VTIM_timeval/VTIM_timespec argument type with reality

timevals and timespecs could represent vtim_real / vmtim_mono
also, but for now, all use cases within varnish-cache are for vtim_dur

As we typedef vtim_{real,mono,dur} to double at the moment, this should
not break any vmods.
parent 98af434d
...@@ -36,5 +36,5 @@ vtim_real VTIM_parse(const char *p); ...@@ -36,5 +36,5 @@ vtim_real VTIM_parse(const char *p);
vtim_mono VTIM_mono(void); vtim_mono VTIM_mono(void);
vtim_real VTIM_real(void); vtim_real VTIM_real(void);
void VTIM_sleep(vtim_dur t); void VTIM_sleep(vtim_dur t);
struct timespec VTIM_timespec(vtim_real t); struct timespec VTIM_timespec(vtim_dur t);
struct timeval VTIM_timeval(vtim_real t); struct timeval VTIM_timeval(vtim_dur t);
...@@ -414,8 +414,13 @@ VTIM_sleep(vtim_dur t) ...@@ -414,8 +414,13 @@ VTIM_sleep(vtim_dur t)
#endif #endif
} }
/*
* VTIM_timeval and VTIM_timespec may need variants with different signatures
* when vtim_real / vtim_mono typedefs are changed
*/
struct timeval struct timeval
VTIM_timeval(vtim_real t) VTIM_timeval(vtim_dur t)
{ {
struct timeval tv; struct timeval tv;
...@@ -426,7 +431,7 @@ VTIM_timeval(vtim_real t) ...@@ -426,7 +431,7 @@ VTIM_timeval(vtim_real t)
} }
struct timespec struct timespec
VTIM_timespec(vtim_real t) VTIM_timespec(vtim_dur t)
{ {
struct timespec tv; struct timespec tv;
......
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