From 583713d6cefbb8f3486b98d41c481e8208e2db52 Mon Sep 17 00:00:00 2001 From: Jens Lorenz Date: Tue, 27 Mar 2018 15:45:35 +0200 Subject: AMUtil: Test: Fix mExpected value range for 32-bit The duration calculation for mExpected is not working. The playWithTimers oneshot test reported all times warnings. Signed-off-by: Jens Lorenz --- AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp | 2 +- AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp b/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp index ecd38fe..2d21193 100644 --- a/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp +++ b/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.cpp @@ -168,7 +168,7 @@ void am::CAmTimerMeasurment::timerCallback(sh_timerHandle_t handle, void* userDa std::chrono::time_point t_end = std::chrono::high_resolution_clock::now(); if (TP_ZERO != mLastInvocationTime) { - auto durationLast = t_end - mLastInvocationTime; + std::chrono::duration durationLast = t_end - mLastInvocationTime; double diff = (std::chrono::duration(mExpected - durationLast).count()); #ifdef ENABLED_TIMERS_TEST_OUTPUT diff --git a/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h b/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h index ba2bf51..a274605 100644 --- a/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h +++ b/AudioManagerUtilities/test/AmSocketHandlerTest/CAmSocketHandlerTest.h @@ -168,7 +168,7 @@ namespace am timespec mUpdateTimeout; std::chrono::time_point mUpdateTimePoint; std::chrono::time_point mLastInvocationTime; - std::chrono::duration> mExpected; + std::chrono::duration mExpected; int32_t mRepeats; void * mpUserData; std::string mDebugText; -- cgit v1.2.1