summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-04-21 00:49:37 +0200
committerGitHub <noreply@github.com>2020-04-21 00:49:37 +0200
commitad169c3e6ca11379364aa1a8e7b316b4a49292b3 (patch)
treef96ebdc147043bb5b5be502e7db64d7488b0edd0
parentb327b31171346530a08e3acc88e36fd158e0f94d (diff)
parentbc97f3cfcd74545d8c0ffd121d3a591ba79e4fbc (diff)
Merge pull request #12990 from vespa-engine/revert-12988-balder/use-system-independent-xxx_clock
Revert "There are so many combinations that the libstdc++ library can be buil…"
-rw-r--r--vespalib/src/vespa/vespalib/util/time.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/vespalib/src/vespa/vespalib/util/time.cpp b/vespalib/src/vespa/vespalib/util/time.cpp
index 2e8f4e7e30e..46cf4806dfc 100644
--- a/vespalib/src/vespa/vespalib/util/time.cpp
+++ b/vespalib/src/vespa/vespalib/util/time.cpp
@@ -52,29 +52,3 @@ Timer::waitAtLeast(duration dur, bool busyWait) {
}
}
-
-namespace std::chrono {
-
-// This is a hack to avoid the slow clock computations on RHEL7/CentOS 7 due to using systemcalls.
-// This brings cost down from 550-560ns to 18-19ns
-
-inline namespace _V2 {
-
-system_clock::time_point
-system_clock::now() noexcept {
- timespec tp;
- clock_gettime(CLOCK_REALTIME, &tp);
- return time_point(duration(chrono::seconds(tp.tv_sec)
- + chrono::nanoseconds(tp.tv_nsec)));
-}
-
-steady_clock::time_point
-steady_clock::now() noexcept {
- timespec tp;
- clock_gettime(CLOCK_MONOTONIC, &tp);
- return time_point(duration(chrono::seconds(tp.tv_sec)
- + chrono::nanoseconds(tp.tv_nsec)));
-}
-
-}
-}