mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Simplify basic_seconds_clock:
* Remove unneeded vector of workers and associated mutex * Remove unneeded generic worker * Remove unneeded Clock template parameter
This commit is contained in:
committed by
manojsdoshi
parent
c0a0b79d2d
commit
06bd16c928
@@ -29,7 +29,7 @@ public:
|
||||
void
|
||||
run() override
|
||||
{
|
||||
basic_seconds_clock<std::chrono::steady_clock>::now();
|
||||
basic_seconds_clock::now();
|
||||
pass();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -106,7 +106,7 @@ pretty_time(std::ostream& os, std::chrono::duration<Rep, Period> d)
|
||||
else
|
||||
{
|
||||
// use integral
|
||||
os << date::round<nanoseconds>(d).count();
|
||||
os << round<nanoseconds>(d).count();
|
||||
}
|
||||
os << "ns";
|
||||
}
|
||||
@@ -122,7 +122,7 @@ pretty_time(std::ostream& os, std::chrono::duration<Rep, Period> d)
|
||||
else
|
||||
{
|
||||
// use integral
|
||||
os << date::round<microseconds>(d).count();
|
||||
os << round<microseconds>(d).count();
|
||||
}
|
||||
os << "us";
|
||||
}
|
||||
@@ -138,7 +138,7 @@ pretty_time(std::ostream& os, std::chrono::duration<Rep, Period> d)
|
||||
else
|
||||
{
|
||||
// use integral
|
||||
os << date::round<milliseconds>(d).count();
|
||||
os << round<milliseconds>(d).count();
|
||||
}
|
||||
os << "ms";
|
||||
}
|
||||
@@ -154,7 +154,7 @@ pretty_time(std::ostream& os, std::chrono::duration<Rep, Period> d)
|
||||
else
|
||||
{
|
||||
// use integral
|
||||
os << date::round<seconds>(d).count();
|
||||
os << round<seconds>(d).count();
|
||||
}
|
||||
os << "s";
|
||||
}
|
||||
@@ -170,7 +170,7 @@ pretty_time(std::ostream& os, std::chrono::duration<Rep, Period> d)
|
||||
else
|
||||
{
|
||||
// use integral
|
||||
os << date::round<minutes>(d).count();
|
||||
os << round<minutes>(d).count();
|
||||
}
|
||||
os << "min";
|
||||
}
|
||||
@@ -193,7 +193,7 @@ fmtdur(std::chrono::duration<Period, Rep> const& d)
|
||||
class progress
|
||||
{
|
||||
private:
|
||||
using clock_type = beast::basic_seconds_clock<std::chrono::steady_clock>;
|
||||
using clock_type = beast::basic_seconds_clock;
|
||||
|
||||
std::size_t const work_;
|
||||
clock_type::time_point start_ = clock_type::now();
|
||||
|
||||
Reference in New Issue
Block a user