If you want to measure code efficiency, or in any other way measure time intervals, the following will be easier:
#include
int main()
{
clock_t start = clock();
//... do work here
clock_t end = clock();
double time_elapsed_in_seconds = (end - start)/(double)CLOCKS_PER_SEC;
return 0;
}