summaryrefslogtreecommitdiffstats
path: root/util/system
diff options
context:
space:
mode:
authorddoarn <[email protected]>2022-02-10 16:49:53 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:49:53 +0300
commit3bf10d3f40b502d181ef52f5c4602c98cb135360 (patch)
tree5d5cb817648f650d76cf1076100726fd9b8448e8 /util/system
parent0783fe3f48d91a3b741ce2ea32b11fbfc1637e7e (diff)
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'util/system')
-rw-r--r--util/system/event.cpp2
-rw-r--r--util/system/hp_timer.cpp24
-rw-r--r--util/system/tls.h4
3 files changed, 15 insertions, 15 deletions
diff --git a/util/system/event.cpp b/util/system/event.cpp
index d7cc5caaa01..79b3cdb2917 100644
--- a/util/system/event.cpp
+++ b/util/system/event.cpp
@@ -43,7 +43,7 @@ public:
return WaitForSingleObject(cond, (deadLine - now).MilliSeconds()) == WAIT_OBJECT_0;
}
- return (WaitForSingleObject(cond, 0) == WAIT_OBJECT_0);
+ return (WaitForSingleObject(cond, 0) == WAIT_OBJECT_0);
}
#else
inline TEvImpl(ResetMode rmode)
diff --git a/util/system/hp_timer.cpp b/util/system/hp_timer.cpp
index a0bae5d50c4..e4c3f21e6b4 100644
--- a/util/system/hp_timer.cpp
+++ b/util/system/hp_timer.cpp
@@ -10,8 +10,8 @@ namespace {
struct TFreq {
inline TFreq()
: Freq(InitHPTimer())
- , Rate(1.0 / Freq)
- , CyclesPerSecond(static_cast<ui64>(Rate))
+ , Rate(1.0 / Freq)
+ , CyclesPerSecond(static_cast<ui64>(Rate))
{
}
@@ -80,16 +80,16 @@ namespace {
}
inline double GetClockRate() const {
- return Rate;
+ return Rate;
+ }
+
+ inline ui64 GetCyclesPerSecond() const {
+ return CyclesPerSecond;
}
- inline ui64 GetCyclesPerSecond() const {
- return CyclesPerSecond;
- }
-
const double Freq;
- const double Rate;
- const ui64 CyclesPerSecond;
+ const double Rate;
+ const ui64 CyclesPerSecond;
};
}
@@ -102,9 +102,9 @@ double NHPTimer::GetClockRate() noexcept {
}
ui64 NHPTimer::GetCyclesPerSecond() noexcept {
- return TFreq::Instance().GetCyclesPerSecond();
-}
-
+ return TFreq::Instance().GetCyclesPerSecond();
+}
+
void NHPTimer::GetTime(STime* pTime) noexcept {
*pTime = GetCycleCount();
}
diff --git a/util/system/tls.h b/util/system/tls.h
index 1f08352e50a..3c4f56dbeb7 100644
--- a/util/system/tls.h
+++ b/util/system/tls.h
@@ -193,7 +193,7 @@ namespace NTls {
T* Construct(void* ptr) const override {
//memset(ptr, 0, sizeof(T));
- return ::new (ptr) T();
+ return ::new (ptr) T();
}
};
@@ -208,7 +208,7 @@ namespace NTls {
~TCopyConstructor() override = default;
T* Construct(void* ptr) const override {
- return ::new (ptr) T(Value);
+ return ::new (ptr) T(Value);
}
private: