Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
20c74f72
Commit
20c74f72
authored
May 03, 2024
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
deautocrap: Everybody have clock_gettime(2)
parent
afcc3386
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
10 deletions
+3
-10
configure.ac
configure.ac
+0
-1
vtim.c
lib/libvarnish/vtim.c
+3
-9
No files found.
configure.ac
View file @
20c74f72
...
...
@@ -93,7 +93,6 @@ _VARNISH_CHECK_PYTHON
# Check for libraries.
_VARNISH_SEARCH_LIBS(pthread, pthread_create, [thr pthread c_r])
_VARNISH_CHECK_LIB(rt, clock_gettime)
_VARNISH_CHECK_LIB(dl, dlopen)
_VARNISH_CHECK_LIB(socket, socket)
_VARNISH_CHECK_LIB(nsl, getaddrinfo)
...
...
lib/libvarnish/vtim.c
View file @
20c74f72
...
...
@@ -130,19 +130,13 @@ init(void)
vtim_mono
VTIM_mono
(
void
)
{
#if defined(HAVE_CLOCK_GETTIME) && !defined(USE_GETHRTIME)
#if defined(HAVE_GETHRTIME) && defined(USE_GETHRTIME)
return
(
gethrtime
()
*
1e-9
);
#else
struct
timespec
ts
;
AZ
(
clock_gettime
(
CLOCK_MONOTONIC
,
&
ts
));
return
(
ts
.
tv_sec
+
1e-9
*
ts
.
tv_nsec
);
#elif defined(HAVE_GETHRTIME)
return
(
gethrtime
()
*
1e-9
);
#elif defined(__MACH__)
uint64_t
mt
=
mach_absolute_time
()
-
mt_base
;
return
(
mt
*
mt_scale
);
#else
#error Varnish needs some monotonic time source
#endif
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment