From: Sangjung Woo Date: Wed, 18 Jan 2017 07:53:59 +0000 (+0900) Subject: timestamp: fix currentTime() problem X-Git-Tag: accepted/tizen/3.0/ivi/20170119.020919^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F40%2F110840%2F1;p=profile%2Fivi%2Fautomotive-message-broker.git timestamp: fix currentTime() problem amb::Timestamp::currentTime() should return the 'current' time and it is converted to the local time. However, currentTime() uses steady_clock instead of system_clock so it always returns the lower epoch value than the real one. This patch revises the value by adding startTimeEpoch. Change-Id: Ibe6e445e398642e663b130c6185eae989764f2a3 Signed-off-by: Sangjung Woo --- diff --git a/lib/timestamp.cpp b/lib/timestamp.cpp index 9c25902..127f439 100644 --- a/lib/timestamp.cpp +++ b/lib/timestamp.cpp @@ -29,7 +29,7 @@ double amb::Timestamp::currentTime() double time = std::chrono::duration_cast(tm.time_since_epoch()).count() / 1000.00; - return time; + return time + startTimeEpoch; } double amb::Timestamp::epochTime(double time)