omit unused profiling function under certain defines

This commit is contained in:
Stephen Lombardo 2021-02-10 16:12:37 -05:00
parent d7f468c998
commit 34e7f1bc29
1 changed files with 2 additions and 0 deletions

View File

@ -1535,11 +1535,13 @@ int sqlcipher_codec_add_random(codec_ctx *ctx, const char *zRight, int random_sz
return SQLITE_ERROR;
}
#if !defined(SQLITE_OMIT_TRACE) && !defined(SQLITE_OMIT_DEPRECATED)
static void sqlcipher_profile_callback(void *file, const char *sql, sqlite3_uint64 run_time){
FILE *f = (FILE*)file;
double elapsed = run_time/1000000.0;
if(f) fprintf(f, "Elapsed time:%.3f ms - %s\n", elapsed, sql);
}
#endif
int sqlcipher_cipher_profile(sqlite3 *db, const char *destination){
#if defined(SQLITE_OMIT_TRACE) || defined(SQLITE_OMIT_DEPRECATED)