On 21 Nov 2010, at 11:46am, Kees Nuyt wrote:

> <lynton.gr...@logosworld.com> wrote:
> 
>> Hi Simon,
>> 
>> Yup, on Solaris I ran this and it was 1000 milliseconds for the following:
>> 
>> int theReturn = sqlite3_sleep(1);
>> 
>> Any way you know I can make it sleep on Solaris for 1 millisecond? Any other
>> C tricks you know of?
> 
> Standard C Library Functions                           usleep(3C)
> 
> NAME
>     usleep - suspend execution for interval in microseconds

Good note.  But the original question remains: why does the SQLite VM under 
Solaris not implement sqlite3_sleep() with a resolution of at least 
milliseconds ?  It's not like Solaris is hampered by requirements for a tiny 
library !

I found some code in 'os_unix.c' that says

static int unixSleep(sqlite3_vfs *NotUsed, int microseconds){
#if OS_VXWORKS
[...]
#elif defined(HAVE_USLEEP) && HAVE_USLEEP

which suggests that OS_VXWORKS and HAVE_USLEEP are consulted to work out what 
resolution is available.  But then we descend into compile-time parameters and 
I don't know anything about them.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to