#include <stdio.h>
#include <time.h>
#include <windows.h>
void Task()
{
    printf("Hi");
}
int main ( ) {
    time_t t;
    clock_t start, end;
    long i;
    long count;
    double x = 0.0;
    count = 2;
    start = clock();
    time(&t);
    printf(ctime(&t));
    printf( "Counting to %ld\n", count );
    if(count)
    {
        Task();
    }
    end = clock();
    printf( "That took %f seconds and I counted up to %ld", (((double)(end-start)/CLOCKS_PER_SEC)), count );
    printf( "\nThat also took %d clock tics\n ", clock());
    return 0;
} 
I want to get the start time and end time taken to execute the Task function. I am trying to create interrupt for the Task function but displaying Hi in the program. I am not successful with that. So could you please anyone can guide me regarding this.
 
     
     
    