Skip to content
Snippets Groups Projects

makefile et autres

Open LEPPERT MICHAEL requested to merge mleppert/P4z:master into master
Compare and Show latest version
23 files
+ 488
21
Preferences
Compare changes
Files
23
+ 9
2
@@ -24,7 +24,7 @@ void genTabAlea(long tabARemplir[], size_t tailleTab) {
rand_is_seeded = 1;
}
for(size_t i=0; i<tailleTab; i++){
tabARemplir[i]=rand()%(10);
tabARemplir[i]=rand()%(100);
}
}
@@ -58,7 +58,7 @@ void genTabDecroi(long tabARemplir[], size_t tailleTab) {
rand_is_seeded = 1;
}
for(size_t i=0; i<tailleTab; i++){
tabARemplir[i]=rand()%(10);
tabARemplir[i]=rand()%(1000);
}
qsort( tabARemplir, tailleTab, sizeof(long), longComparator );
}
@@ -72,3 +72,10 @@ void affiche_infos(struct compteur cpt){
printf("nombre de fusions : %ld\n", cpt.fusion);
printf("nombre de partitions : %ld\n", cpt.partition);
}
void calc_chrono(clock_t chronoDebut, clock_t chronoFin){
clock_t nbTicks = chronoFin-chronoDebut;
float secondes=(float)nbTicks/CLOCKS_PER_SEC;
float millisecondes=(float)nbTicks * 1000/ CLOCKS_PER_SEC;
printf( "Tri réalisé en %f sec, ou %f millisec. (%ld ticks)\n", secondes, millisecondes, nbTicks );
}