diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sqlite.h.in | 8 | ||||
-rw-r--r-- | src/vdbeapi.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/sqlite.h.in b/src/sqlite.h.in index 286ff5990..57910ee32 100644 --- a/src/sqlite.h.in +++ b/src/sqlite.h.in @@ -2171,7 +2171,13 @@ int sqlite3_set_authorizer( ** ^The callback function registered by sqlite3_profile() is invoked ** as each SQL statement finishes. ^The profile callback contains ** the original statement text and an estimate of wall-clock time -** of how long that statement took to run. +** of how long that statement took to run. ^The profile callback +** time is in units of nanoseconds, however the current implementation +** is only capable of millisecond resolution so the six least significant +** digits in the time are meaningless. Future versions of SQLite +** might provide greater resolution on the profiler callback. The +** sqlite3_profile() function is considered experimental and is +** subject to change in future versions of SQLite. */ void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*); SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*, diff --git a/src/vdbeapi.c b/src/vdbeapi.c index 2f5aaa36d..afb4a1b6e 100644 --- a/src/vdbeapi.c +++ b/src/vdbeapi.c @@ -398,7 +398,7 @@ static int sqlite3Step(Vdbe *p){ if( rc!=SQLITE_ROW && db->xProfile && !db->init.busy && p->zSql ){ sqlite3_int64 iNow; sqlite3OsCurrentTimeInt64(db->pVfs, &iNow); - db->xProfile(db->pProfileArg, p->zSql, iNow - p->startTime); + db->xProfile(db->pProfileArg, p->zSql, (iNow - p->startTime)*1000000); } #endif |