mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-31 07:34:19 +00:00
change low res sleep func api names
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11486 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
1973ee74bc
commit
0463541d61
49 files changed
+180
-180
No files matched your search
@@ -2118,7 +2118,7 @@ static JSBool session_wait_for_media(JSContext * cx, JSObject * obj, uintN argc,
|
||||
channel = switch_core_session_get_channel(jss->session);
|
||||
CHANNEL_MEDIA_SANITY_CHECK();
|
||||
|
||||
started = switch_timestamp_now();
|
||||
started = switch_micro_time_now();
|
||||
|
||||
if (argc > 0) {
|
||||
JS_ValueToInt32(cx, argv[0], &timeout);
|
||||
@@ -2132,7 +2132,7 @@ static JSBool session_wait_for_media(JSContext * cx, JSObject * obj, uintN argc,
|
||||
}
|
||||
saveDepth = JS_SuspendRequest(cx);
|
||||
for (;;) {
|
||||
if (((elapsed = (unsigned int) ((switch_timestamp_now() - started) / 1000)) > (switch_time_t) timeout)
|
||||
if (((elapsed = (unsigned int) ((switch_micro_time_now() - started) / 1000)) > (switch_time_t) timeout)
|
||||
|| switch_channel_get_state(channel) >= CS_HANGUP) {
|
||||
*rval = BOOLEAN_TO_JSVAL(JS_FALSE);
|
||||
break;
|
||||
@@ -2165,7 +2165,7 @@ static JSBool session_wait_for_answer(JSContext * cx, JSObject * obj, uintN argc
|
||||
METHOD_SANITY_CHECK();
|
||||
channel = switch_core_session_get_channel(jss->session);
|
||||
|
||||
started = switch_timestamp_now();
|
||||
started = switch_micro_time_now();
|
||||
|
||||
if (argc > 0) {
|
||||
JS_ValueToInt32(cx, argv[0], &timeout);
|
||||
@@ -2180,7 +2180,7 @@ static JSBool session_wait_for_answer(JSContext * cx, JSObject * obj, uintN argc
|
||||
|
||||
saveDepth = JS_SuspendRequest(cx);
|
||||
for (;;) {
|
||||
if (((elapsed = (unsigned int) ((switch_timestamp_now() - started) / 1000)) > (switch_time_t) timeout)
|
||||
if (((elapsed = (unsigned int) ((switch_micro_time_now() - started) / 1000)) > (switch_time_t) timeout)
|
||||
|| switch_channel_get_state(channel) >= CS_HANGUP) {
|
||||
*rval = BOOLEAN_TO_JSVAL(JS_FALSE);
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user