time-util: introduce deserialize_timestamp_value()
authorKunhoon Baik <knhoon.baik@samsung.com>
Fri, 26 Aug 2016 01:33:24 +0000 (10:33 +0900)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Fri, 26 Jan 2024 16:49:49 +0000 (17:49 +0100)
commite2d0ae357e52063f51d1fec019977fa33aaf3619
treeab9ed52ea63501bc32f86de48df0772cddf26699
parent26481cc85ff426008a9dc6c3d0d2fa036a858f52
time-util: introduce deserialize_timestamp_value()

The time-util.c provides dual_timestamp_deserialize() function to
convert value to usec_t and set it as value of ts->monotonic and
ts->realtime.

There are some places in code which do the same but only for one
clockid_t (realtime or monotonic), when dual_timestamp_deserialize()
sets value of both.

This patch introduces the deserialize_timestamp_value() which converts
 a given value to usec_t and write it to a given timestamp.

Change-Id: I29140ec8b39aa2f7168671fd9dbac041044f13e4
Origin: https://github.com/systemd/systemd/commit/ebf30a086
src/basic/time-util.c