2
* See the file LICENSE for redistribution information.
4
* Copyright (c) 1997-2002
5
* Sleepycat Software. All rights reserved.
11
static const char revid[] = "$Id$";
18
* Yield the processor for a period of time.
21
__os_sleep(dbenv, secs, usecs)
23
u_long secs, usecs; /* Seconds and microseconds. */
25
COMPQUIET(dbenv, NULL);
27
/* Don't require that the values be normalized. */
28
for (; usecs >= 1000000; ++secs, usecs -= 1000000)
31
if (DB_GLOBAL(j_sleep) != NULL)
32
return (DB_GLOBAL(j_sleep)(secs, usecs));
35
* It's important that we yield the processor here so that other
36
* processes or threads are permitted to run.
38
Sleep(secs * 1000 + usecs / 1000);