mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-14 09:58:17 +00:00
tweaks
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9761 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -139,6 +139,15 @@ SWITCH_DECLARE(void) switch_time_sync(void)
|
||||
SWITCH_DECLARE(void) switch_sleep(switch_interval_time_t t)
|
||||
{
|
||||
|
||||
#if defined(HAVE_USLEEP)
|
||||
usleep(t);
|
||||
#elif defined(WIN32)
|
||||
Sleep((DWORD) ((t) / 1000));
|
||||
#else
|
||||
apr_sleep(t);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
#if defined(HAVE_CLOCK_NANOSLEEP) && defined(SWITCH_USE_CLOCK_FUNCS)
|
||||
struct timespec ts;
|
||||
ts.tv_sec = t / APR_USEC_PER_SEC;
|
||||
@@ -153,7 +162,7 @@ SWITCH_DECLARE(void) switch_sleep(switch_interval_time_t t)
|
||||
#else
|
||||
apr_sleep(t);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user