mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-02 06:05:53 +00:00
timer: Add now() for timer_set
This commit is contained in:
@@ -335,7 +335,7 @@ future<> reactor_backend_epoll::timers_completed() {
|
||||
void reactor::complete_timers() {
|
||||
timers_completed().then(
|
||||
[this] () {
|
||||
_expired_timers = _timers.expire(clock_type::now());
|
||||
_expired_timers = _timers.expire(_timers.now());
|
||||
for (auto& t : _expired_timers) {
|
||||
t._expired = true;
|
||||
}
|
||||
|
||||
@@ -237,6 +237,10 @@ public:
|
||||
{
|
||||
return _non_empty_buckets.none();
|
||||
}
|
||||
|
||||
time_point now() {
|
||||
return Timer::clock::now();
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user