]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
common/Timer: add SafeTimer::add_event_at(real_clock::time_point)
authorKefu Chai <kchai@redhat.com>
Thu, 4 Feb 2021 07:05:05 +0000 (15:05 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 4 Feb 2021 11:26:52 +0000 (19:26 +0800)
commit50ec7c3a53b3cfe83b5ac8fc42cc28127e113dda
treea68eefd75a34f66f5bb16a88bb9fd5b8fe819249
parentdf4160114a1998abd2c72b9526207d66a6f03f9b
common/Timer: add SafeTimer::add_event_at(real_clock::time_point)

so we can schedule an event with real_clock::time_point. timer should
wait using a mono_time, but user might want to pass a
real_clock::time_point to it when, for instance, scheduling a task which
should be performed in future at a specified time. in this case, we need
to convert the real_clock::time_point to a "known" time_point.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/common/Timer.cc
src/common/Timer.h