danicoin/src/Platform/Windows/System/Timer.h

30 lines
598 B
C
Raw Normal View History

// 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.
2014-09-15 10:48:45 +00:00
#pragma once
#include <chrono>
namespace System {
class Dispatcher;
2014-09-15 10:48:45 +00:00
class Timer {
public:
Timer();
explicit Timer(Dispatcher& dispatcher);
2014-09-15 10:48:45 +00:00
Timer(const Timer&) = delete;
Timer(Timer&& other);
~Timer();
Timer& operator=(const Timer&) = delete;
Timer& operator=(Timer&& other);
void sleep(std::chrono::nanoseconds duration);
2014-09-15 10:48:45 +00:00
private:
Dispatcher* dispatcher;
void* context;
2014-09-15 10:48:45 +00:00
};
}