SQLite Forum

What is the poll frequency of `sqlite3_busy_timeout`?
So you could write your own busy handler that causes a "poll" to occur every 32 ms for some specified time in seconds as follows:

int myBusyHandler(void* ptr, int times)
   if ((intptr_t)ptr < times * 0.032)
      return 0;
   return 1;

and activate it with the following code:

db = sqlite3_open ...;
sqlite3_busy_handler(db, myBusyHandler, (void*)300);

Note that there is no API to retrieve the connection timeout in the API so for your own busy handler you cannot access the busy_timeout set for the connection.