/*-****************************************
* Dependencies
******************************************/
-#include <time.h> /* clock_t, nanosleep, clock, CLOCKS_PER_SEC */
+#define _POSIX_C_SOURCE 199309L /* before <time.h> - needed for nanosleep() */
+#include <time.h> /* clock_t, nanosleep, clock, CLOCKS_PER_SEC */
+#include <sys/types.h> /* stat */
+#include <sys/stat.h> /* stat */
+#include "mem.h" /* U32, U64 */
/*-****************************************
UTIL_STATIC U64 UTIL_clockSpanMicro( UTIL_time_t clockStart, UTIL_time_t ticksPerSecond )
{
UTIL_time_t clockEnd;
-
(void)ticksPerSecond;
+
UTIL_getTime(clockEnd);
return UTIL_getSpanTimeMicro(ticksPerSecond, clockStart, clockEnd);
}
UTIL_STATIC void UTIL_waitForNextTick(UTIL_time_t ticksPerSecond)
{
UTIL_time_t clockStart, clockEnd;
+ (void)ticksPerSecond;
+
UTIL_getTime(clockStart);
- do { UTIL_getTime(clockEnd); }
- while (UTIL_getSpanTimeNano(ticksPerSecond, clockStart, clockEnd) == 0);
+ do {
+ UTIL_getTime(clockEnd);
+ } while (UTIL_getSpanTimeNano(ticksPerSecond, clockStart, clockEnd) == 0);
}
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memset */
#include <stdio.h> /* fprintf, fopen, ftello64 */
-#include <sys/types.h> /* stat64 */
-#include <sys/stat.h> /* stat64 */
#include <time.h> /* clock */
#include "mem.h" /* read */
/* *************************************
* Includes
***************************************/
-#define _POSIX_C_SOURCE 199309L /* before <time.h> - needed for nanosleep() */
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memset */
#include <stdio.h> /* fprintf, fopen, ftello64 */
-#include <sys/types.h> /* stat64 */
-#include <sys/stat.h> /* stat64 */
+#include "util.h" /* UTIL_GetFileSize */
#include "mem.h"
#include "zstd_static.h"
#include "datagen.h" /* RDG_genBuffer */
#include "xxhash.h"
-#include "util.h" /* UTIL_GetFileSize */
/* *************************************
#include <stdlib.h> /* malloc, free */
#include <string.h> /* memset */
#include <stdio.h> /* fprintf, fopen, ftello64 */
-#include <sys/types.h> /* stat64 */
-#include <sys/stat.h> /* stat64 */
-#include <time.h> /* clock */
+#include "util.h" /* UTIL_GetFileSize */
#include "mem.h" /* read */
#include "error_private.h"
#include "dibio.h"
-#include "util.h" /* UTIL_GetFileSize */
/*-*************************************
#include <string.h> /* strcmp, strlen */
#include <time.h> /* clock */
#include <errno.h> /* errno */
-#include <sys/types.h> /* stat64 */
-#include <sys/stat.h> /* stat64 */
-#include "mem.h"
+
#include "util.h" /* UTIL_GetFileSize */
+#include "mem.h"
#include "fileio.h"
#include "zstd_static.h" /* ZSTD_magicNumber, ZSTD_frameHeaderSize_max */
#include "zbuff_static.h"
**************************************/
#include <stdlib.h> /* malloc */
#include <stdio.h> /* fprintf, fopen, ftello64 */
-#include <sys/types.h> /* stat64 */
-#include <sys/stat.h> /* stat64 */
#include <string.h> /* strcmp */
#include <time.h> /* clock_t, clock, CLOCKS_PER_SEC */
+#include "util.h" /* UTIL_GetFileSize */
#include "mem.h"
#include "zstd_static.h"
#include "fse_static.h"
#include "zbuff.h"
#include "datagen.h"
-#include "util.h" /* UTIL_GetFileSize */
/*_************************************
**************************************/
#include <stdlib.h> /* malloc */
#include <stdio.h> /* fprintf, fopen, ftello64 */
-#include <sys/types.h> /* stat64 */
-#include <sys/stat.h> /* stat64 */
#include <string.h> /* strcmp */
#include <math.h> /* log */
# include <sys/time.h> /* gettimeofday */
#endif
+#include "util.h" /* UTIL_GetFileSize */
#include "mem.h"
#include "zstd_static.h"
#include "datagen.h"
#include "xxhash.h"
-#include "util.h" /* UTIL_GetFileSize */
/*-************************************
* Constants
**************************************/
-#define PROGRAM_DESCRIPTION "ZSTD_HC parameters tester"
+#define PROGRAM_DESCRIPTION "ZSTD parameters tester"
#ifndef ZSTD_VERSION
# define ZSTD_VERSION ""
#endif