aboutsummaryrefslogblamecommitdiffstats
path: root/library/cpp/messagebus/rain_check/core/sleep.h
blob: 1a7a1f86741d370bba3513b09d1b3e4f8bf297a3 (plain) (tree)
1
2
3
4
5
6
7
8
            
                
 
                                                       
 
                               
 














                                                               
#pragma once

#include "fwd.h"

#include <library/cpp/messagebus/scheduler/scheduler.h>

#include <util/datetime/base.h>

namespace NRainCheck {
    class TSleepService {
    private:
        THolder< ::NBus::NPrivate::TScheduler> SchedulerHolder;
        ::NBus::NPrivate::TScheduler* const Scheduler;

    public:
        TSleepService(::NBus::NPrivate::TScheduler*);
        TSleepService();
        ~TSleepService();

        // Wake up a task after given duration.
        void Sleep(TSubtaskCompletion* r, TDuration);
    };

}