#include #include #include #include #include int hora(void) { time_t t; time(&t); struct tm* petm = localtime(&t); return petm->tm_hour; } int minutos(void) { time_t t; time(&t); struct tm* petm = localtime(&t); return petm->tm_min; } int segundos(void) { time_t t; time(&t); struct tm* petm = localtime(&t); return petm->tm_sec; } int main(int argc, char ** argv) { time_t seconds; int i, r, numero_ciclos, numero_ciclosM, t1, t2; clock_t start, end; // Se inicializa el generador de numeros aleatorios time(&seconds); srand((unsigned int) seconds); numero_ciclos = 10000000; numero_ciclosM = numero_ciclos / 1E6; start = clock(); for(i=0; i