on FreeBSD + Clang + libc++ + amd64, std::chrono::nanoseconds::rep is `long
long` instead of `long`, so the explictly instantiated template
operator<< operator instances in `src/common/ceph_time.cc` are not able to
cover this use case. so in this change, the duration is casted to
ceph::timespan instead of nanoseconds. so we can ensure that `operator<<` is
always available in this case.
Signed-off-by: Kefu Chai <kchai@redhat.com>
b.calc_csum(0, bl);
}
ceph::mono_clock::time_point end = ceph::mono_clock::now();
- auto dur = std::chrono::duration_cast<std::chrono::nanoseconds>(end - start);
+ auto dur = std::chrono::duration_cast<ceph::timespan>(end - start);
double mbsec = (double)count * (double)bl.length() / 1000000.0 / (double)dur.count() * 1000000000.0;
cout << "csum_type " << Checksummer::get_csum_type_string(csum_type)
<< ", " << dur << " seconds, "