Further progress on migration to sqlite3_vfs. (CVS 4242)

FossilOrigin-Name: a258c4ec240f96bccfe493e98d0827ec7dd12e67
diff --git a/src/main.c b/src/main.c
index b3eab17..9db08c4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -14,7 +14,7 @@
 ** other files are for internal use by SQLite and should not be
 ** accessed by users of the library.
 **
-** $Id: main.c,v 1.384 2007/08/17 15:53:36 danielk1977 Exp $
+** $Id: main.c,v 1.385 2007/08/18 10:59:20 danielk1977 Exp $
 */
 #include "sqliteInt.h"
 #include "os.h"
@@ -1378,7 +1378,11 @@
 int sqlite3_sleep(int ms){
   sqlite3_vfs *pVfs;
   pVfs = sqlite3_find_vfs(0);
-  return sqlite3OsSleep(pVfs, 1000*ms);
+
+  /* This function works in milliseconds, but the underlying OsSleep() 
+  ** API uses microseconds. Hence the 1000's.
+  */
+  return (sqlite3OsSleep(pVfs, 1000*ms)/1000);
 }
 
 /*