diff options
author | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-11-04 14:05:28 +0000 |
---|---|---|
committer | Matteo Martincigh <matteo.martincigh@arm.com> | 2019-11-06 15:50:10 +0000 |
commit | 5dc816e7d027170992e45d22ae11ae3000de9244 (patch) | |
tree | d96d8a759dd0bcd9b98df36698ded032caa13bd0 /src/profiling/PeriodicCounterCapture.cpp | |
parent | 5edc8816118fcddb2681379db04c978041ce8b46 (diff) | |
download | armnn-5dc816e7d027170992e45d22ae11ae3000de9244.tar.gz |
IVGCVSW-4065 Add a RecordEvent function
* Added RecordEvent utility function to the TimelineUtilityMethods
class
* Added new utility function to get a timestamp
* Added unit tests
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
Change-Id: Ia3f8fe7397915fa6c903ce0c0abab3047cea628c
Diffstat (limited to 'src/profiling/PeriodicCounterCapture.cpp')
-rw-r--r-- | src/profiling/PeriodicCounterCapture.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/profiling/PeriodicCounterCapture.cpp b/src/profiling/PeriodicCounterCapture.cpp index f888bc045e..12e58f2800 100644 --- a/src/profiling/PeriodicCounterCapture.cpp +++ b/src/profiling/PeriodicCounterCapture.cpp @@ -92,18 +92,11 @@ void PeriodicCounterCapture::Capture(const IReadCounterValues& readCounterValues values.emplace_back(std::make_pair(requestedId, counterValue)); } - #if USE_CLOCK_MONOTONIC_RAW - using clock = MonotonicClockRaw; - #else - using clock = std::chrono::steady_clock; - #endif - // Take a timestamp - auto timestamp = clock::now(); + uint64_t timestamp = GetTimestamp(); // Write a Periodic Counter Capture packet to the Counter Stream Buffer - m_SendCounterPacket.SendPeriodicCounterCapturePacket( - static_cast<uint64_t>(timestamp.time_since_epoch().count()), values); + m_SendCounterPacket.SendPeriodicCounterCapturePacket(timestamp, values); // Notify the Send Thread that new data is available in the Counter Stream Buffer m_SendCounterPacket.SetReadyToRead(); |