From faea8601b7eaad9f2291f354ee3b2f5bfb678cd7 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Mon, 15 Oct 2007 12:06:15 +0300 Subject: [PATCH] Display timing information only if debuging --- src/osm-db.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/osm-db.c b/src/osm-db.c index e2190bd..9930205 100644 --- a/src/osm-db.c +++ b/src/osm-db.c @@ -16,6 +16,7 @@ #include "osm-db.h" /* #define DEBUG_OSM */ +/* #define DEBUG_OSM_TIME */ #define OSM_PLACE_CACHE_MAX_ITEMS (64) #define OSM_DB_PROGRESS_NUM (10000) @@ -434,7 +435,9 @@ if (SQLITE_OK != sqlite3_bind_int(sql.select_way2, 1, lat) || return NULL; } +#ifdef DEBUG_OSM_TIME g_timer_start(dbt); +#endif while (SQLITE_ROW == sqlite3_step(sql.select_way2)) { guint32 dist; @@ -459,8 +462,10 @@ while (SQLITE_ROW == sqlite3_step(sql.select_way2)) { ways=g_list_prepend(ways, w); } +#ifdef DEBUG_OSM_TIME g_timer_stop(dbt); g_printf("Query took: %f sec, found: %d ways\n", g_timer_elapsed(dbt, &tms), wc); +#endif return ways; } -- 2.39.5