Skip to content

Instantly share code, notes, and snippets.

@Tosainu
Last active December 23, 2015 11:29
Show Gist options
  • Save Tosainu/16ce25eee37e20fd96ad to your computer and use it in GitHub Desktop.
Save Tosainu/16ce25eee37e20fd96ad to your computer and use it in GitHub Desktop.
nyan
#include <iostream>
#include <chrono>
int main(int argc, char const* argv[]) {
const auto before = std::chrono::system_clock::now();
for (long long int i = 0; i < 100000000; i++) {
i + 1;
}
const auto after = std::chrono::system_clock::now();
const auto m = std::chrono::duration_cast<std::chrono::milliseconds>(after - before);
std::cout << m.count() << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment