#include <stdio.h>
#include "platform.h"
#include "xil_printf.h"
#include "xtime_l.h"



int main()
{

	XTime startg , endg ;



    init_platform();

    XTime_GetTime(&startg);
    xil_printf("Timer Run\n");
    XTime_GetTime(&endg);


    ///////AXI Timer = 2.54 usec

    printf("Number of Clock Ticks :  %0llu\n",endg - startg);  ///u64 --> long long unsigned --> llu
    printf("Time Elapsed in nSec :  %0f\n", (endg - startg)* (2000000000.0 / XPAR_CPU_CORTEXA9_CORE_CLOCK_FREQ_HZ));
    printf("Time Elapsed in uSec :  %0f\n", (endg - startg)* (2000000.0 / XPAR_CPU_CORTEXA9_CORE_CLOCK_FREQ_HZ));


    cleanup_platform();
    return 0;
}