Skip to content

Instantly share code, notes, and snippets.

@matlink
Created February 16, 2018 14:29
Show Gist options
  • Save matlink/ac110edb1eb8b64c0f196617f42eb0d1 to your computer and use it in GitHub Desktop.
Save matlink/ac110edb1eb8b64c0f196617f42eb0d1 to your computer and use it in GitHub Desktop.

Revisions

  1. matlink created this gist Feb 16, 2018.
    7 changes: 7 additions & 0 deletions runtime.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    #include <time.h>
    clock_t begin = clock();

    /* here, do your time-consuming job */

    clock_t end = clock();
    double time_spent = (double)(end - begin) / CLOCKS_PER_SEC;