sensor_listener_proxy: Add timestamp in accuracy change event 10/282510/3 accepted/tizen_7.0_unified_hotfix tizen_7.0_hotfix accepted/tizen/7.0/unified/20221110.063751 accepted/tizen/7.0/unified/hotfix/20221116.105756 accepted/tizen/unified/20221005.144500 tizen_7.0_m2_release
authorTaeminYeom <taemin.yeom@samsung.com>
Wed, 5 Oct 2022 00:55:56 +0000 (09:55 +0900)
committerTaemin Yeom <taemin.yeom@samsung.com>
Wed, 5 Oct 2022 00:57:27 +0000 (00:57 +0000)
Change-Id: I80120402a331f05a4ffe99ee978c517bfd90b58c
Signed-off-by: TaeminYeom <taemin.yeom@samsung.com>
src/server/sensor_listener_proxy.cpp

index 4639c0e..5a537e7 100644 (file)
@@ -98,6 +98,10 @@ void sensor_listener_proxy::update_accuracy(std::shared_ptr<ipc::message> msg)
        sensor_data_t acc_data = {0, };
        acc_data.accuracy = m_last_accuracy;
 
+       struct timespec ts;
+       clock_gettime(CLOCK_MONOTONIC, &ts);
+       acc_data.timestamp = ((unsigned long long)(ts.tv_sec)*1000000000LL + ts.tv_nsec) / 1000;
+
        auto acc_msg = ipc::message::create();
 
        retm_if(!acc_msg, "Failed to allocate memory");