mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
blinktree: Use Genode::timestamp() instead of std::chrono's functions.
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include <mx/tasking/config.h>
|
||||
#include <mx/tasking/profiling/statistic.h>
|
||||
#include <mx/tasking/runtime.h>
|
||||
#include <mx/system/environment.h>
|
||||
#include <mx/util/core_set.h>
|
||||
#include <numeric>
|
||||
#include <ostream>
|
||||
@@ -183,17 +184,21 @@ public:
|
||||
#ifdef PERF_SUPPORT
|
||||
_perf.start();
|
||||
#endif
|
||||
_start = std::chrono::steady_clock::now();
|
||||
|
||||
//_start = std::chrono::steady_clock::now();
|
||||
_start = Genode::Trace::timestamp();
|
||||
}
|
||||
|
||||
InterimResult<P> stop(const std::uint64_t count_operations)
|
||||
{
|
||||
const auto end = std::chrono::steady_clock::now();
|
||||
const auto end = Genode::Trace::timestamp();
|
||||
//const auto end = std::chrono::steady_clock::now();
|
||||
#ifdef PERF_SUPPORT
|
||||
_perf.stop();
|
||||
#endif
|
||||
|
||||
const auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(end - _start);
|
||||
//const auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(end-_start);
|
||||
const auto milliseconds = std::chrono::milliseconds((end-_start)/2000000UL);
|
||||
|
||||
return {count_operations,
|
||||
_current_phase,
|
||||
@@ -219,7 +224,8 @@ private:
|
||||
#ifdef PERF_SUPPORT
|
||||
alignas(64) Perf _perf;
|
||||
#endif
|
||||
alignas(64) std::chrono::steady_clock::time_point _start;
|
||||
//alignas(64) std::chrono::steady_clock::time_point _start;
|
||||
alignas(64) size_t _start;
|
||||
|
||||
std::unordered_map<std::uint16_t, std::uint64_t> statistic_map(
|
||||
const mx::tasking::profiling::Statistic::Counter counter)
|
||||
|
||||
Reference in New Issue
Block a user