mirror of
https://github.com/mmueller41/mxtasking.git
synced 2026-01-21 12:42:57 +01:00
Use one Timer::Connection per ProfilingTask instead of per IdleRange.
This commit is contained in:
1
build/.cmake/api/v1/query/client-vscode/query.json
Normal file
1
build/.cmake/api/v1/query/client-vscode/query.json
Normal file
@@ -0,0 +1 @@
|
||||
{"requests":[{"kind":"cache","version":2},{"kind":"codemodel","version":2},{"kind":"toolchains","version":1}]}
|
||||
@@ -16,7 +16,7 @@ namespace mx::tasking::profiling {
|
||||
class IdleRange
|
||||
{
|
||||
public:
|
||||
IdleRange() : _timer(Timer::Connection(system::Environment::env)), _start(std::chrono::microseconds(_timer.elapsed_ms())) {}
|
||||
IdleRange(Timer::Connection &timer) : _timer(timer), _start(std::chrono::microseconds(_timer.elapsed_ms())) {}
|
||||
IdleRange(IdleRange &&) = default;
|
||||
~IdleRange() = default;
|
||||
|
||||
@@ -55,7 +55,7 @@ private:
|
||||
std::chrono::steady_clock::time_point _end;
|
||||
|
||||
// Timer session for Genode
|
||||
Timer::Connection _timer;
|
||||
Timer::Connection &_timer;
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -78,6 +78,9 @@ private:
|
||||
util::maybe_atomic<bool> &_is_running;
|
||||
Channel &_channel;
|
||||
std::vector<IdleRange> _idle_ranges;
|
||||
|
||||
// Timer session for Genode
|
||||
Timer::Connection &_timer;
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user