diff options
author | dan <dan@noemail.net> | 2010-05-14 10:43:28 +0000 |
---|---|---|
committer | dan <dan@noemail.net> | 2010-05-14 10:43:28 +0000 |
commit | a9f0fc8edc0344c5ffc6ee76ed6a2c808a45f772 (patch) | |
tree | 6af9ad15b72318c5197bc3720afc2e7a5fd3d808 /src | |
parent | 14740f1cd59edc13444600fc79b34930a8578d96 (diff) | |
download | sqlite-a9f0fc8edc0344c5ffc6ee76ed6a2c808a45f772.tar.gz sqlite-a9f0fc8edc0344c5ffc6ee76ed6a2c808a45f772.zip |
Fix test_osinst.c so that it does not depend on gettimeofday() unless SQLITE_OS_UNIX is defined and NO_GETTOD is not defined.
FossilOrigin-Name: 2a4014b79b852d8b62b4941495b826f154308d86
Diffstat (limited to 'src')
-rw-r--r-- | src/test_osinst.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/src/test_osinst.c b/src/test_osinst.c index f14ab06a4..c75e0cf8c 100644 --- a/src/test_osinst.c +++ b/src/test_osinst.c @@ -68,12 +68,6 @@ #include <string.h> #include <assert.h> -/* -** hwtime.h contains inline assembler code for implementing -** high-performance timing routines. -*/ -#include "hwtime.h" - /* ** Maximum pathname length supported by the vfslog backend. @@ -215,17 +209,18 @@ static sqlite3_io_methods vfslog_io_methods = { vfslogShmClose /* xShmClose */ }; +#if defined(SQLITE_OS_UNIX) && !defined(NO_GETTOD) #include <sys/time.h> - static sqlite3_uint64 vfslog_time(){ -#if 0 - return sqlite3Hwtime(); -#else struct timeval sTime; gettimeofday(&sTime, 0); return sTime.tv_usec + (sqlite3_uint64)sTime.tv_sec * 1000000; -#endif } +#else +static sqlite3_uint64 vfslog_time(){ + return 0; +} +#endif static void vfslog_call(sqlite3_vfs *, int, int, int, int, int, int); static void vfslog_string(sqlite3_vfs *, const char *); |