aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichalis Spyrou <michalis.spyrou@arm.com>2019-02-08 15:26:24 +0000
committerMichalis Spyrou <michalis.spyrou@arm.com>2019-02-08 16:22:45 +0000
commitd1fe4ce1290c32d9ebc4c97d81d469fb7546d682 (patch)
tree16c45cbc43e752ed152007f1b3dffe584e3bf276
parent8e150a1a74bb4c2d097731f5caf2eab676017c72 (diff)
downloadComputeLibrary-d1fe4ce1290c32d9ebc4c97d81d469fb7546d682.tar.gz
COMPMID-1710 Use system_clock in WallClock
On some systems high_resolution_clock can be either system_clock or steady_clock. Use system_clock in order to get system time when using wall clock timestamps. Change-Id: I90e6958ed2ebea07d29c335c7f59a1db91af4ab9 Reviewed-on: https://review.mlplatform.org/652 Reviewed-by: VidhyaSudhan Loganathan <vidhyasudhan.loganathan@arm.com> Reviewed-by: Pablo Marquez <pablo.tello@arm.com> Tested-by: Arm Jenkins <bsgcomp@arm.com>
-rw-r--r--tests/framework/instruments/WallClockTimer.cpp6
-rw-r--r--tests/framework/instruments/WallClockTimer.h8
2 files changed, 7 insertions, 7 deletions
diff --git a/tests/framework/instruments/WallClockTimer.cpp b/tests/framework/instruments/WallClockTimer.cpp
index b5dc864a40..0e21ac71fb 100644
--- a/tests/framework/instruments/WallClockTimer.cpp
+++ b/tests/framework/instruments/WallClockTimer.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -48,13 +48,13 @@ std::string WallClock<output_timestamps>::id() const
template <bool output_timestamps>
void WallClock<output_timestamps>::start()
{
- _start = std::chrono::high_resolution_clock::now();
+ _start = std::chrono::system_clock::now();
}
template <bool output_timestamps>
void WallClock<output_timestamps>::stop()
{
- _stop = std::chrono::high_resolution_clock::now();
+ _stop = std::chrono::system_clock::now();
}
template <bool output_timestamps>
diff --git a/tests/framework/instruments/WallClockTimer.h b/tests/framework/instruments/WallClockTimer.h
index d659ab1a80..fb047aa7e4 100644
--- a/tests/framework/instruments/WallClockTimer.h
+++ b/tests/framework/instruments/WallClockTimer.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2017-2018 ARM Limited.
+ * Copyright (c) 2017-2019 ARM Limited.
*
* SPDX-License-Identifier: MIT
*
@@ -70,9 +70,9 @@ public:
MeasurementsMap measurements() const override;
private:
- std::chrono::high_resolution_clock::time_point _start{};
- std::chrono::high_resolution_clock::time_point _stop{};
- float _scale_factor{};
+ std::chrono::system_clock::time_point _start{};
+ std::chrono::system_clock::time_point _stop{};
+ float _scale_factor{};
};
using WallClockTimer = WallClock<false>;