int sqlite3_busy_timeout( sqlite3* db, int ms );
db
A database connection.
ms
The total timeout duration, in milliseconds (thousandths of a second).
An SQLite result code.
This function registers an internal busy handler that keeps attempting to acquire a busy lock until the total specified time has passed. Because this function registers an internal busy handler, any current busy handler is removed. The timeout value can be explicitly removed by setting a timeout value of zero.