blob: 8cde8c8d98582fb70b85048be2c382ac3ff581b0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#pragma once
#include <util/generic/ptr.h>
#include <util/datetime/base.h>
#include <functional>
namespace NCron {
struct IHandle {
virtual ~IHandle();
};
using TJob = std::function<void()>;
using IHandlePtr = TAutoPtr<IHandle>;
IHandlePtr StartPeriodicJob(TJob job);
IHandlePtr StartPeriodicJob(TJob job, TDuration interval);
IHandlePtr StartPeriodicJob(TJob job, TDuration interval, const TString& threadName);
}
|