Skip to content

Instantly share code, notes, and snippets.

@joaomoreno
Created January 9, 2018 10:10
Show Gist options
  • Save joaomoreno/8d4b529cca82f7fd7122a982b3670cc7 to your computer and use it in GitHub Desktop.
Save joaomoreno/8d4b529cca82f7fd7122a982b3670cc7 to your computer and use it in GitHub Desktop.
timing bug
#include "stdafx.h"
#include <iostream>
#include <chrono>
#include <thread>
int main()
{
while (true) {
std::cout << "sleeping for 500ms" << std::endl;
std::this_thread::sleep_for(std::chrono::milliseconds(500));
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment