]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/ceph_time: add operator<< for signedspan
authorKefu Chai <kchai@redhat.com>
Thu, 7 Jan 2021 03:56:25 +0000 (11:56 +0800)
committerDavid Galloway <dgallowa@redhat.com>
Wed, 11 May 2022 16:26:05 +0000 (12:26 -0400)
commitfbf53a25702ab40e59cb231974037dc0c31793be
tree987cdf099143e4cb5b9b48c57fa68f02c67c1f22
parent8543e24f1c681627e3670ec884aa41efa319c3c1
common/ceph_time: add operator<< for signedspan

* templatize operator<<(ostream&, duration<>), so it works for more
  duration<> classes with minimal efforts -- we just need to explicitly
  instantiate these template operators
* explicitly instantiate operator<< for timespan, signedspan, seconds
  and milliseconds. they are most likely to be used in Ceph. we can add
  more of them when necessary.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit a64b96dba14df1e61ee6eb449535a6ff4a9d64b3)
src/common/ceph_time.cc
src/common/ceph_time.h