Created
December 16, 2014 04:38
-
-
Save mitliagkas/aa6139e5a13d5603dda5 to your computer and use it in GitHub Desktop.
Calculates elapsed cpu time. From: http://www.cs.utah.edu/dept/old/texinfo/glibc-manual-0.02/library_19.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <time.h> | |
clock_t start, end; | |
double elapsed; | |
start = clock(); | |
... /* Do the work. */ | |
end = clock(); | |
elapsed = ((double) (end - start)) / CLOCKS_PER_SEC; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment