mirror of
https://github.com/nginx/nginx.git
synced 2026-04-15 22:09:26 -04:00
Removed CLOCK_MONOTONIC_FAST support.
Some checks failed
buildbot / buildbot (push) Has been cancelled
Some checks failed
buildbot / buildbot (push) Has been cancelled
CLOCK_MONOTONIC_FAST, like CLOCK_MONOTONIC_COARSE, has low accuracy. It shows noticeable timing variation for short intervals, which is visible in metrics like $upstream_response_time for fast upstream responses. This change complements the work started in commitf29d7ade5. In addition to the reasons described inf29d7ade5, the performance of CLOCK_MONOTONIC is good enough on modern hardware when using a TSC timecounter. This is especially true when it is accessed through a shared page, as implemented in FreeBSD 10.0 (see git commits 869fd80fd449 and aea810386d8e for details). Co-authored-by: Sergey Kandaurov <pluknet@nginx.com>
This commit is contained in:
parent
7924a4ec6c
commit
2ff1a969f3
1 changed files with 0 additions and 4 deletions
|
|
@ -198,11 +198,7 @@ ngx_monotonic_time(time_t sec, ngx_uint_t msec)
|
|||
#if (NGX_HAVE_CLOCK_MONOTONIC)
|
||||
struct timespec ts;
|
||||
|
||||
#if defined(CLOCK_MONOTONIC_FAST)
|
||||
clock_gettime(CLOCK_MONOTONIC_FAST, &ts);
|
||||
#else
|
||||
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||
#endif
|
||||
|
||||
sec = ts.tv_sec;
|
||||
msec = ts.tv_nsec / 1000000;
|
||||
|
|
|
|||
Loading…
Reference in a new issue