aboutsummaryrefslogtreecommitdiffstats
path: root/util/system/fasttime.cpp
diff options
context:
space:
mode:
authorAnton Samokhvalov <pg83@yandex.ru>2022-02-10 16:45:15 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:15 +0300
commit72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch)
treeda2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/system/fasttime.cpp
parent778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff)
downloadydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/system/fasttime.cpp')
-rw-r--r--util/system/fasttime.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/util/system/fasttime.cpp b/util/system/fasttime.cpp
index 057a814f0a..33f56edd95 100644
--- a/util/system/fasttime.cpp
+++ b/util/system/fasttime.cpp
@@ -1,29 +1,29 @@
-#include "dynlib.h"
-#include "fasttime.h"
+#include "dynlib.h"
+#include "fasttime.h"
#include <util/generic/singleton.h>
#include <util/generic/yexception.h>
#include <utility>
-
+
#include <util/thread/singleton.h>
-#if defined(_win_) || defined(_arm32_) || defined(_cygwin_)
+#if defined(_win_) || defined(_arm32_) || defined(_cygwin_)
ui64 InterpolatedMicroSeconds() {
return MicroSeconds();
}
#else
- #include <dlfcn.h>
- #include <sys/time.h>
-
- #if defined(_musl_)
- #include <util/generic/hash.h>
- #include <util/generic/vector.h>
- #include <util/generic/string.h>
-
- #include <contrib/libs/linuxvdso/interface.h>
- #endif
-
+ #include <dlfcn.h>
+ #include <sys/time.h>
+
+ #if defined(_musl_)
+ #include <util/generic/hash.h>
+ #include <util/generic/vector.h>
+ #include <util/generic/string.h>
+
+ #include <contrib/libs/linuxvdso/interface.h>
+ #endif
+
namespace {
using TTime = ui64;
@@ -36,13 +36,13 @@ namespace {
// not DEFAULT, cause library/cpp/gettimeofday
Func = reinterpret_cast<TFunc>(dlsym(RTLD_NEXT, "gettimeofday"));
- #if defined(_musl_)
+ #if defined(_musl_)
if (!Func) {
Func = reinterpret_cast<TFunc>(NVdso::Function("__vdso_gettimeofday", "LINUX_2.6"));
- }
- #endif
-
- if (!Func) {
+ }
+ #endif
+
+ if (!Func) {
Func = reinterpret_cast<TFunc>(Libc()->Sym("gettimeofday"));
}
}
@@ -59,16 +59,16 @@ namespace {
static inline THolder<TDynamicLibrary> OpenLibc() {
const char* libs[] = {
- "/lib/libc.so.8",
- "/lib/libc.so.7",
- "/lib/libc.so.6",
- };
+ "/lib/libc.so.8",
+ "/lib/libc.so.7",
+ "/lib/libc.so.6",
+ };
for (auto& lib : libs) {
try {
return MakeHolder<TDynamicLibrary>(lib);
} catch (...) {
- // ¯\_(ツ)_/¯
+ // ¯\_(ツ)_/¯
}
}
@@ -179,7 +179,7 @@ namespace {
}
B_ = (n * sxy - sx * sy) / (n * sxx - sx * sx);
- A_ = (sy - B_ * sx) / n;
+ A_ = (sy - B_ * sx) / n;
}
private: