]> 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>
Fri, 24 Nov 2023 00:16:38 +0000 (19:16 -0500)
commitb7aa16da4bbb444f6361e4f14be7ef64b0ea3bb1
treeb4bcd4af7ea74e8cb0922596d2c20ddd6b6ffd7e
parent54eec5bf8f81a8573de16bfa1e009b1f902bb6c0
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>
src/include/encoding.h