mirror of
https://github.com/mmueller41/mxtasking.git
synced 2026-01-21 12:42:57 +01:00
Use std::chrono on Linux.
This commit is contained in:
@@ -182,16 +182,15 @@ public:
|
|||||||
_core_set = core_set;
|
_core_set = core_set;
|
||||||
|
|
||||||
_perf.start();
|
_perf.start();
|
||||||
_start = mx::system::Environment::timestamp(); // std::chrono::steady_clock::now();
|
_start = std::chrono::steady_clock::now();
|
||||||
}
|
}
|
||||||
|
|
||||||
InterimResult<P> stop(const std::uint64_t count_operations)
|
InterimResult<P> stop(const std::uint64_t count_operations)
|
||||||
{
|
{
|
||||||
const auto end = mx::system::Environment::timestamp(); // std::chrono::steady_clock::now();
|
const auto end = std::chrono::steady_clock::now();
|
||||||
_perf.stop();
|
_perf.stop();
|
||||||
|
|
||||||
const auto milliseconds = std::chrono::milliseconds(
|
const auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(end - _start);
|
||||||
(end - _start) / 2000000UL); // std::chrono::duration_cast<std::chrono::milliseconds>(end - _start);
|
|
||||||
|
|
||||||
return {count_operations,
|
return {count_operations,
|
||||||
_current_phase,
|
_current_phase,
|
||||||
@@ -216,8 +215,8 @@ private:
|
|||||||
P _current_phase;
|
P _current_phase;
|
||||||
mx::util::core_set _core_set;
|
mx::util::core_set _core_set;
|
||||||
alignas(64) Perf _perf;
|
alignas(64) Perf _perf;
|
||||||
//alignas(64) std::chrono::steady_clock::time_point _start;
|
alignas(64) std::chrono::steady_clock::time_point _start;
|
||||||
alignas(64) uint64_t _start;
|
//alignas(64) uint64_t _start;
|
||||||
|
|
||||||
std::unordered_map<std::uint16_t, std::uint64_t> statistic_map(
|
std::unordered_map<std::uint16_t, std::uint64_t> statistic_map(
|
||||||
const mx::tasking::profiling::Statistic::Counter counter)
|
const mx::tasking::profiling::Statistic::Counter counter)
|
||||||
|
|||||||
Reference in New Issue
Block a user