danicoin/src/Platform/Linux/System/Timer.h
2015-09-18 11:55:31 +00:00

31 lines
611 B
C++

// Copyright (c) 2011-2015 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;
};
}