shithub: aacenc

Download patch

ref: 8d45c274c57be2acd0d21da9bffe48e1cddd0e0c
parent: 730fd809ed594663b6b9f45d4f4f30ab6fe47812
author: thebard <thebard>
date: Tue Feb 22 11:11:56 EST 2000

Timer now works correctly for unix.

--- a/faac.c
+++ b/faac.c
@@ -253,6 +253,7 @@
   int		nMins;
 #else
 	float	totalSecs;
+	int		mins;
 #endif
 
   /* create main aacstream object */
@@ -303,8 +304,12 @@
     printf("Encoding %s took:\t%d:%.2d\t\n", InFileNames[i], nMins, nSecs);
 #else
 		totalSecs = (float)(clock())/(float)CLOCKS_PER_SEC;
-		printf("Encoding %s took:\t%d:%.2d\t\n", InFileNames[i],
-			totalSecs/(float)60, totalSecs - ((float)60 * (totalSecs/(float)60)));
+		printf("Encoding %s took: %5.2f sec.\n", InFileNames[i],
+			(float)(clock())/(float)CLOCKS_PER_SEC);
+		mins = totalSecs/60;
+		printf("Blah: %i\n", mins); 
+		printf("Encoding %s took: %i min, %.2f sec.\n", InFileNames[i],
+			mins, totalSecs - (60 * mins));
 #endif
     if(InFileNames[i]) free(InFileNames[i]);
     if(OutFileNames[i]) free(OutFileNames[i]);