2015-07-23 14:13:09 +10:00
|
|
|
/*
|
2018-08-04 15:14:06 +10:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
2015-07-23 14:13:09 +10:00
|
|
|
*
|
2016-04-05 11:02:54 +10:00
|
|
|
* Copyright 2010-2016 Danny Robson <danny@nerdcruft.net>
|
2015-07-23 14:13:09 +10:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include "time.hpp"
|
|
|
|
|
2019-06-22 15:46:34 +10:00
|
|
|
#include "thread/thread.hpp"
|
|
|
|
|
2019-05-05 09:29:35 +10:00
|
|
|
#include <chrono>
|
2015-07-23 14:13:09 +10:00
|
|
|
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
void
|
2018-08-05 14:42:02 +10:00
|
|
|
cruft::sleep (uint64_t ns)
|
2015-07-23 14:13:09 +10:00
|
|
|
{
|
2019-06-22 15:46:34 +10:00
|
|
|
cruft::thread::this_thread::sleep_for (std::chrono::nanoseconds (ns));
|
2015-07-23 14:13:09 +10:00
|
|
|
}
|