Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Delay (http://www.velocityreviews.com/forums/t688366-delay.html)

Dirk Bruere at NeoPax 06-19-2009 03:26 AM

Delay
 
Any simple way to just get an n mS delay?
I need a 200mS delay between sending two packets using UDP

--
Dirk

http://www.transcendence.me.uk/ - Transcendence UK
http://www.theconsensus.org/ - A UK political party
http://www.onetribe.me.uk/wordpress/?cat=5 - Our podcasts on weird stuff

Dirk Bruere at NeoPax 06-19-2009 03:55 AM

Re: Delay
 
Dirk Bruere at NeoPax wrote:
> Any simple way to just get an n mS delay?
> I need a 200mS delay between sending two packets using UDP
>

Got it - just found the example I was looking for:

public static void delay(int ms)
{
try
{
Thread.sleep(ms);
}
catch (Exception e){}
}


--
Dirk

http://www.transcendence.me.uk/ - Transcendence UK
http://www.theconsensus.org/ - A UK political party
http://www.onetribe.me.uk/wordpress/?cat=5 - Our podcasts on weird stuff

Roedy Green 06-19-2009 05:13 AM

Re: Delay
 
On Fri, 19 Jun 2009 04:26:52 +0100, Dirk Bruere at NeoPax
<dirk.bruere@gmail.com> wrote, quoted or indirectly quoted someone who
said :

>Any simple way to just get an n mS delay?
>I need a 200mS delay between sending two packets using UDP


see http://mindprod.com/jgloss/sleep.html
--
Roedy Green Canadian Mind Products
http://mindprod.com

If everyone lived the way people do in Vancouver, we would need three more entire planets to support us.
~ Guy Dauncey


All times are GMT. The time now is 09:59 PM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.