]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
encoding: add round_trip_encode()/decode() for chrono types
authorCasey Bodley <cbodley@redhat.com>
Wed, 15 Nov 2023 20:29:35 +0000 (15:29 -0500)
committerCasey Bodley <cbodley@redhat.com>
Mon, 27 Nov 2023 13:19:35 +0000 (08:19 -0500)
commit75fbe176b3aa845533772dc512407e31c4f89fc7
treeb7c6850f737eba45c699ca64e1782af549f7f669
parenta021e73ae82911eef94527f99e0e637244d8dbf2
encoding: add round_trip_encode()/decode() for chrono types

the default encodings for chrono types were made to be
backward-compatible with utime_t, so truncated seconds to 32 bits

adds new functions that encode these chrono types using their underlying
representation, which for ceph::real_time and ceph::timespan is
'nanoseconds as uint64_t'

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit b7aa16da4bbb444f6361e4f14be7ef64b0ea3bb1)
src/include/encoding.h