• Nils Goroll's avatar
    monotonic clock for macos · e3363acc
    Nils Goroll authored
    The otherwise recommended clock_get_time(SYSTEM_TIME) is about 40x
    slower than mach_absolute_time() even after minimizing overhead by
    retrieving the port right only once per process - see
    https://github.com/nigoroll/varnish-cache/tree/macos_SYSTEM_CLOCK
    
    So we revert to mach_absolute_time() which needs some scaling but
    otherwise does the job. It is reported to halt on iOS devices when
    sleeping, but even if anyone came up with the idea to sell varnish
    over the app store, sleeping would probably need to be avoided in the
    first place and otherwise the right way would probably be to adjust
    the offset using pre/post sleep callbacks.
    
    As MacOS should have been the last platform using the real clock
    fallback for VTIM_mono, we now bail out at compile-time for any
    platform we have overlooked.
    e3363acc
Name
Last commit
Last update
.github Loading commit data...
bin Loading commit data...
devscripts Loading commit data...
doc Loading commit data...
etc Loading commit data...
include Loading commit data...
lib Loading commit data...
m4 Loading commit data...
man Loading commit data...
.gitignore Loading commit data...
.syntastic_c_config Loading commit data...
.travis.yml Loading commit data...
CONTRIBUTING Loading commit data...
ChangeLog Loading commit data...
INSTALL Loading commit data...
LICENSE Loading commit data...
Makefile.am Loading commit data...
Makefile.inc.phk Loading commit data...
Makefile.phk Loading commit data...
README.Packaging Loading commit data...
README.rst Loading commit data...
autogen.des Loading commit data...
autogen.sh Loading commit data...
config.phk Loading commit data...
configure.ac Loading commit data...
flint.lnt Loading commit data...
varnish-legacy.m4 Loading commit data...
varnish.m4 Loading commit data...
varnishapi-uninstalled.pc.in Loading commit data...
varnishapi.pc.in Loading commit data...