Salve a tutti, sapreste dirmi se questo codice sia C o C++??
E spiegarmi brevemente che cosa fa?? (mi fareste un grossissimo piacere)
ciao

#include <stdio.h>
#include <time.h>
#ifdef _WIN32
#include <windows.h>

static LARGE_INTEGER _tstart, _tend;
static LARGE_INTEGER freq;

void tstart(void)
{
static int first = 1;
if(first){
QueryPerformanceFrequency(&freq);
first = 0;
}
QueryPerformanceCounter(&_tstart);
}

void tend(void)
{
QueryPerformanceCounter(&_tend);
}

double tval()
{
return ((double)_tend.QuadPart - (double)_tstart.QuadPart)/((double)freq.QuadPart);
}
#else
#include <sys/time.h>

static struct timeval _tstart, _tend;
static struct timezone tz;

void tstart(void)
{
gettimeofday(&_tstart, &tz);
}

void tend(void)
{
gettimeofday(&_tend,&tz);
}

double tval()
{
typedef signed long s;
s t1, t2;
t1 = (s)_tstart.tv_sec + (s)_tstart.tv_usec/(1000*1000);
t2 = (s)_tend.tv_sec + (s)_tend.tv_usec/(1000*1000);
return t2-t1;
}
#endif

main(){

tstart();
funzionequalsiasi();
tend();
double tempo=tval();
printf("\n tempo di calcolo : %f", tempo);
}