<div dir="ltr">I have no idea what you are referring to but this should work the same.</div><br><div class="gmail_quote"><div dir="ltr">On Sat, Oct 6, 2018 at 3:48 PM Nils Goroll <<a href="mailto:nils.goroll@uplex.de">nils.goroll@uplex.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The previous logic set USE_GETHRTIME to 0 when it was not to be used.<br>
<br>
Now the logic does not match the test program any more.<br>
<br>
On 06/10/2018 16:13, Federico G. Schwindt wrote:<br>
> <br>
> commit a2d0b594afd73b6c472a25cf3eb01c88e00cc9b7<br>
> Author: Federico G. Schwindt <<a href="mailto:fgsch@lodoss.net" target="_blank">fgsch@lodoss.net</a>><br>
> Date:   Fri Oct 5 14:07:03 2018 +0100<br>
> <br>
>     Polish<br>
> <br>
> diff --git a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a> b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> index 169325892..204519b3b 100644<br>
> --- a/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> +++ b/<a href="http://configure.ac" rel="noreferrer" target="_blank">configure.ac</a><br>
> @@ -355,7 +355,6 @@ AC_CHECK_FUNCS([clock_gettime])<br>
>  AC_CHECK_FUNCS([gethrtime])<br>
>  LIBS="${save_LIBS}"<br>
>  <br>
> -AC_DEFINE([USE_GETHRTIME], [1], [whether to use gethrtime])<br>
>  if test "x$ac_cv_func_gethrtime" = xyes && \<br>
>     test "x$ac_cv_func_clock_gettime" = xyes ; then<br>
>    AC_MSG_CHECKING(if clock_gettime is faster than gethrtime)<br>
> @@ -405,9 +404,9 @@ static hrtime_t cl()<br>
>       return (1);<br>
>      ]])],<br>
>      [AC_MSG_RESULT(yes)<br>
> -     AC_DEFINE([USE_GETHRTIME], [0], [whether to use gethrtime])<br>
>      ],<br>
>      [AC_MSG_RESULT(no)<br>
> +     AC_DEFINE([USE_GETHRTIME], [1], [Define if gethrtime is preferred])<br>
>      ]<br>
>    )<br>
>  fi<br>
> diff --git a/lib/libvarnish/vtim.c b/lib/libvarnish/vtim.c<br>
> index 39d5ca342..5c6503c7e 100644<br>
> --- a/lib/libvarnish/vtim.c<br>
> +++ b/lib/libvarnish/vtim.c<br>
> @@ -127,14 +127,14 @@ init(void)<br>
>  double<br>
>  VTIM_mono(void)<br>
>  {<br>
> -#if defined(HAVE_GETHRTIME) && USE_GETHRTIME<br>
> -     return (gethrtime() * 1e-9);<br>
> -#elif  HAVE_CLOCK_GETTIME<br>
> +#if defined(HAVE_CLOCK_GETTIME) && !defined(USE_GETHRTIME)<br>
>       struct timespec ts;<br>
>  <br>
>       AZ(clock_gettime(CLOCK_MONOTONIC, &ts));<br>
>       return (ts.tv_sec + 1e-9 * ts.tv_nsec);<br>
> -#elif  defined(__MACH__)<br>
> +#elif defined(HAVE_GETHRTIME)<br>
> +     return (gethrtime() * 1e-9);<br>
> +#elif defined(__MACH__)<br>
>       uint64_t mt = mach_absolute_time() - mt_base;<br>
>  <br>
>       return (mt * mt_scale);<br>
> _______________________________________________<br>
> varnish-commit mailing list<br>
> <a href="mailto:varnish-commit@varnish-cache.org" target="_blank">varnish-commit@varnish-cache.org</a><br>
> <a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit</a><br>
> <br>
<br>
<br>
-- <br>
<br>
** * * UPLEX - Nils Goroll Systemoptimierung<br>
<br>
Scheffelstraße 32<br>
22301 Hamburg<br>
<br>
tel +49 40 28805731<br>
mob +49 170 2723133<br>
fax +49 40 42949753<br>
<br>
xmpp://<a href="http://slink@jabber.int.uplex.de/" rel="noreferrer" target="_blank">slink@jabber.int.uplex.de/</a><br>
<br>
<a href="http://uplex.de/" rel="noreferrer" target="_blank">http://uplex.de/</a><br>
<br>
</blockquote></div>