[Freeswitch-users] Putting javascript to sleep

Anthony Minessale anthony.minessale at gmail.com
Fri Nov 14 17:06:58 PST 2008


we added our own msleep function to js

msleep(<milliseconds>);


On Fri, Nov 14, 2008 at 4:56 PM, Michael Collins <msc at freeswitch.org> wrote:

> I believe this is a limitation in JavaScript. There is no "sleep" command
> or function, just some setTimeout kind of thing where you launch a function
> after a predetermined interval. I think with js you're stuck with an
> inelegant solution... :(
>
> -MC
>
> On Fri, Nov 14, 2008 at 2:42 PM, Jon Bruel <jbr at consiglia.dk> wrote:
>
>>  I have worked on making a set of scripts and dialplans for a traditional
>> queue, which rings the agents. I have published suggestions and ideas on the
>> WIKI, but I'm still not satisfied with the solution. One of the challenges
>> has been to emulate a sleep command as known in php and many other
>> languages.  I have solved it by creating a session for the sake of this, and
>> run session.execute("sleep", 5000), but this solution pivots on the creation
>> of the session, and it not very clean in my opinion. So my question is: are
>> there any elegant ways of putting javascript to sleep in FS? /Jon
>>
>> _______________________________________________
>> Freeswitch-users mailing list
>> Freeswitch-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>
> _______________________________________________
> Freeswitch-users mailing list
> Freeswitch-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>


-- 
Anthony Minessale II

FreeSWITCH http://www.freeswitch.org/
ClueCon http://www.cluecon.com/

AIM: anthm
MSN:anthony_minessale at hotmail.com <MSN%3Aanthony_minessale at hotmail.com>
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com<PAYPAL%3Aanthony.minessale at gmail.com>
IRC: irc.freenode.net #freeswitch

FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org <sip%3A888 at conference.freeswitch.org>
iax:guest at conference.freeswitch.org/888
googletalk:conf+888 at conference.freeswitch.org<googletalk%3Aconf%2B888 at conference.freeswitch.org>
pstn:213-799-1400
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20081114/dd80b75b/attachment-0002.html 


More information about the FreeSWITCH-users mailing list