// Include the time.h library

#include <time.h>
#include <stdio.h>
int main()
{
    int i;
    clock_t startTime, endTime; /*these are for recording two times*/
    double timeFactor;

    timeFactor = 1.0/CLOCKS_PER_SEC; /*constant is defined in time.h; why is it here?*/
    // Put the starting time into startTime
    startTime = clock();

    /*****Execute some statements that you want to time: *******/

    for(i=0; i<10000000; i++); //is this valid C? what does it mean?

    /*****end of statements to time*****************************/

    // Put the current time into endTime
    endTime = clock();
    // Print out the difference between start and end times
    printf("Time = %lf seconds", timeFactor * (endTime - startTime) );
}
