mirror of
https://github.com/facebook/zstd.git
synced 2025-08-08 17:22:10 +03:00
ticksPerSecond=0
This commit is contained in:
@@ -72,7 +72,7 @@
|
|||||||
|
|
||||||
#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
|
#if !defined(_WIN32) && (defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)))
|
||||||
typedef clock_t BMK_time_t;
|
typedef clock_t BMK_time_t;
|
||||||
# define BMK_initTimer(ticksPerSecond) (void)ticksPerSecond
|
# define BMK_initTimer(ticksPerSecond) ticksPerSecond=0
|
||||||
# define BMK_getTime(x) x = clock()
|
# define BMK_getTime(x) x = clock()
|
||||||
# define BMK_getSpanTimeMicro(ticksPerSecond, clockStart, clockEnd) (1000000ULL * (clockEnd - clockStart) / CLOCKS_PER_SEC)
|
# define BMK_getSpanTimeMicro(ticksPerSecond, clockStart, clockEnd) (1000000ULL * (clockEnd - clockStart) / CLOCKS_PER_SEC)
|
||||||
# define BMK_getSpanTimeNano(ticksPerSecond, clockStart, clockEnd) (1000000000ULL * (clockEnd - clockStart) / CLOCKS_PER_SEC)
|
# define BMK_getSpanTimeNano(ticksPerSecond, clockStart, clockEnd) (1000000000ULL * (clockEnd - clockStart) / CLOCKS_PER_SEC)
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
# define BMK_getSpanTimeNano(ticksPerSecond, clockStart, clockEnd) (1000000000ULL*(clockEnd.QuadPart - clockStart.QuadPart)/ticksPerSecond.QuadPart)
|
# define BMK_getSpanTimeNano(ticksPerSecond, clockStart, clockEnd) (1000000000ULL*(clockEnd.QuadPart - clockStart.QuadPart)/ticksPerSecond.QuadPart)
|
||||||
#else
|
#else
|
||||||
typedef int BMK_time_t;
|
typedef int BMK_time_t;
|
||||||
# define BMK_initTimer(ticksPerSecond) (void)ticksPerSecond
|
# define BMK_initTimer(ticksPerSecond) ticksPerSecond=0
|
||||||
# define BMK_getTimeMicro(clockStart) clockStart=1
|
# define BMK_getTimeMicro(clockStart) clockStart=1
|
||||||
# define BMK_getSpanTimeMicro(ticksPerSecond, clockStart, clockEnd) (TIMELOOP_S*1000000ULL+clockEnd-clockStart)
|
# define BMK_getSpanTimeMicro(ticksPerSecond, clockStart, clockEnd) (TIMELOOP_S*1000000ULL+clockEnd-clockStart)
|
||||||
# define BMK_getSpanTimeNano(ticksPerSecond, clockStart, clockEnd) (TIMELOOP_S*1000000000ULL+clockEnd-clockStart)
|
# define BMK_getSpanTimeNano(ticksPerSecond, clockStart, clockEnd) (TIMELOOP_S*1000000000ULL+clockEnd-clockStart)
|
||||||
|
Reference in New Issue
Block a user