Skip to content

Commit

Permalink
Fixed rounding of profiling time.
Browse files Browse the repository at this point in the history
  • Loading branch information
DnV1eX committed May 8, 2021
1 parent 42f52d3 commit 83c3454
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/SQLiteCombine/SQLiteCombine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public final class SQLite {
sqlite3_trace_v2(db, UInt32(events.rawValue), { event, _, p, x in
switch Int32(event) {
case SQLITE_TRACE_STMT: print("SQLite trace stmt", p ?? "", x.map { String(cString: $0.assumingMemoryBound(to: CChar.self)) } ?? "")
case SQLITE_TRACE_PROFILE: print("SQLite trace profile", p ?? "", x.map { TimeInterval($0.load(as: Int64.self)) * 1e-9 } ?? "")
case SQLITE_TRACE_PROFILE: print("SQLite trace profile", p ?? "", x.map { TimeInterval($0.load(as: Int64.self)) / 1e9 } ?? "")
case SQLITE_TRACE_ROW: print("SQLite trace row", p ?? "")
case SQLITE_TRACE_CLOSE: print("SQLite trace close", p ?? "")
default: break
Expand Down

0 comments on commit 83c3454

Please sign in to comment.