aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/time_provider/monotonic_provider.h
blob: 966e2e496ba6d17129b2f3ff726e7e3c4ee9962f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#pragma once

#include <util/datetime/base.h>
#include "monotonic.h"

class IMonotonicTimeProvider: public TThrRefBase {
public:
    virtual TMonotonic Now() = 0;
};

class TMonotonicOperator {
public:
    static void RegisterProvider(TIntrusivePtr<IMonotonicTimeProvider> provider);
    static TMonotonic Now();
};

namespace NMonotonic {

TIntrusivePtr<IMonotonicTimeProvider> CreateDefaultMonotonicTimeProvider();

}