Fix executor::dispatch_at time_point_cast bug

This commit is contained in:
Nikita Lisitsa 2020-11-21 15:32:14 +03:00
parent 8ecf10de30
commit ff5d778118

View file

@ -160,7 +160,7 @@ namespace psemek::util
{
using R = decltype(f());
auto state = std::make_shared<detail::task_state<R>>();
post_at(std::chrono::time_point_cast<clock::time_point>(time), detail::wrap_task(state, std::forward<F>(f), std::forward<Args>(args)...));
post_at(std::chrono::time_point_cast<clock::duration>(time), detail::wrap_task(state, std::forward<F>(f), std::forward<Args>(args)...));
return future<R>(state);
}