summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHåvard Pettersen <3535158+havardpe@users.noreply.github.com>2023-02-08 11:22:31 +0100
committerGitHub <noreply@github.com>2023-02-08 11:22:31 +0100
commit8be38796b3861b45c7bb7fc2aab3f0f8245a2e40 (patch)
tree75cd201a5f40a81f2615b8f74c1a9f62003bcf9a
parent46d6f353d8aea4b1c20329da427b3b8aee335ad4 (diff)
parent7b42e88b93b682c3eb85390bcb7b5ab589a1d0e9 (diff)
Merge pull request #25935 from vespa-engine/balder/gc-old-_v2-clock-implementation
No longer need the trick for fast clock after we left centos7/rhel7 …
-rw-r--r--vespalib/src/vespa/vespalib/util/time.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/vespalib/src/vespa/vespalib/util/time.cpp b/vespalib/src/vespa/vespalib/util/time.cpp
index 2dbaade8c0a..51d5e580609 100644
--- a/vespalib/src/vespa/vespalib/util/time.cpp
+++ b/vespalib/src/vespa/vespalib/util/time.cpp
@@ -92,37 +92,3 @@ Timer::waitAtLeast(duration dur, bool busyWait) {
}
}
-
-#ifndef __clang__
-
-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 on a Intel Haswell 2680 cpu.
- * We are providing the symbols here so they will take precedence over the ones in the standard library.
- * We rely on the linker do handle correct symbol resolution.
- * TODO: Once we are off the ancient platforms like Centos 7/ Rhel 7 we can drop this workaround.
-*/
-
-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)));
-}
-
-}
-}
-#endif