author | František Kučera <franta-hg@frantovo.cz> |
Sat, 23 Dec 2017 23:42:46 +0100 | |
changeset 22 | cb2055cdc2f0 |
parent 20 | c++/rgb-assembler/commands/Goto.h@b9ceffdcaf14 |
child 29 | 10d6964e7b4a |
permissions | -rw-r--r-- |
1 #pragma once
3 #include <wchar.h>
4 #include <chrono>
5 #include <thread>
7 #include "../Command.h"
9 using namespace std;
11 namespace commands {
13 class Sleep : public Command {
14 public:
16 void process(octet_t* memory, address_t& index) override {
17 sleep_t delay = read<sleep_t>(memory, index);
18 wprintf(L"SLEEP %*d ms\n", 4, delay);
19 this_thread::sleep_for(chrono::milliseconds(delay));
20 }
21 private:
23 };
25 }