playback: use mono clk instead of real clk [1/1]
PD#OTT-49505
Problem:
the time for internal logic should be monotonic
Solution:
use mono clk instead of real clk
Verify:
Project
Change-Id: If2f42493ce26c926e2e6aacbb1d8325f998f41dc
Signed-off-by: Zhiqiang Han <zhiqiang.han@amlogic.com>
diff --git a/src/dvr_playback.c b/src/dvr_playback.c
index ef8ac20..0e3e16e 100644
--- a/src/dvr_playback.c
+++ b/src/dvr_playback.c
@@ -311,7 +311,7 @@
{
struct timespec ts;
uint32_t ms;
- clock_gettime(CLOCK_REALTIME, &ts);
+ clock_gettime(CLOCK_MONOTONIC, &ts);
ms = (uint32_t)(ts.tv_sec*1000+ts.tv_nsec/1000000);
return ms;
}