Skip to content

Instantly share code, notes, and snippets.

@yifu
Created September 21, 2012 15:03
Show Gist options
  • Select an option

  • Save yifu/3762019 to your computer and use it in GitHub Desktop.

Select an option

Save yifu/3762019 to your computer and use it in GitHub Desktop.
#include <iostream>
#include <time.h>
#include <unistd.h>
int main()
{
std::cout << "hello" << std::endl;
// sleep(5);
clock_t start;
start = clock();
clock_t end = start + 10 * CLOCKS_PER_SEC;
while(clock() < end)
{
int i = 0;
while(i < 10000)
++i;
}
std::cout << "bye" << std::endl;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment