danicoin/src/Platform/Linux/System/Timer.h
2016-01-18 15:33:29 +00:00

31 lines
611 B
C++

// Copyright (c) 2011-2016 The Cryptonote developers
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#pragma once
#include <chrono>
namespace System {
class Dispatcher;
class Timer {
public:
Timer();
explicit Timer(Dispatcher& dispatcher);
Timer(const Timer&) = delete;
Timer(Timer&& other);
~Timer();
Timer& operator=(const Timer&) = delete;
Timer& operator=(Timer&& other);
void sleep(std::chrono::nanoseconds duration);
private:
Dispatcher* dispatcher;
void* context;
int timer;
};
}