Skip to content

Instantly share code, notes, and snippets.

@xiaom
Created June 15, 2013 07:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiaom/5787231 to your computer and use it in GitHub Desktop.
Save xiaom/5787231 to your computer and use it in GitHub Desktop.
difference in time
clock_t start, end;
start = clock();
//
// YOUR CODE
//
end = clock();
cerr << "Inverted Index is built in "
<< (double)(end - start) / CLOCKS_PER_SEC * 1000
<< " ms." << endl;
// In addition,
//
// difftime(start, end) return time in second
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment