]> git.apps.os.sepia.ceph.com Git - ceph.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>
Thu, 11 Jan 2024 15:57:11 +0000 (10:57 -0500)
commit6b24b92f081af1fb82cc1b605c2d6fb6211d59ba
tree1442cdc8605a8933992761b30e8995592716a10a
parent322fc615e67de87ccc9fe429c6dbb2058aa9c7d8
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