🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.api
4 messages
4 total messages Started by RaynorPao Sun, 23 Mar 2003 14:24
sleep
#637
Author: RaynorPao
Date: Sun, 23 Mar 2003 14:24
7 lines
1068 bytes
Hi all:

In C++, there is an API Sleep can be used.
Is there an API like "Sleep" can be used in Java?

Thanks.
RaynorPao.
Re: sleep
#638
Author: Gillmer J. Derge [TeamB]
Date: Sun, 23 Mar 2003 14:38
9 lines
1272 bytes
"RaynorPao" <RaynorPao.nospam@nospam.pchome.com.tw> wrote in message
news:3e7dbfc6@newsgroups.borland.com...
> In C++, there is an API Sleep can be used.
> Is there an API like "Sleep" can be used in Java?

The Thread class has two sleep methods.

--
Gillmer J. Derge [TeamB]
Re: sleep
#639
Author: RaynorPao
Date: Sun, 23 Mar 2003 15:05
22 lines
1513 bytes
Hi Gillmer:

Thanks for your reply.
I just want to dely 500 milliseconds.
Is there a simple way? or not?

Thanks.
RaynorPao.

"Gillmer J. Derge [TeamB]" <spam@gillmerderge.com> ���g��l��
news:3e7dc6b0@newsgroups.borland.com...
> "RaynorPao" <RaynorPao.nospam@nospam.pchome.com.tw> wrote in message
> news:3e7dbfc6@newsgroups.borland.com...
> > In C++, there is an API Sleep can be used.
> > Is there an API like "Sleep" can be used in Java?
>
> The Thread class has two sleep methods.
>
> --
> Gillmer J. Derge [TeamB]
>
>
Re: sleep
#640
Author: Owen Green
Date: Sun, 23 Mar 2003 22:36
22 lines
1486 bytes
In article <3e7dc953@newsgroups.borland.com>, 
RaynorPao.nospam@nospam.pchome.com.tw says...
> Hi Gillmer:
> 
> Thanks for your reply.
> I just want to dely 500 milliseconds.
> Is there a simple way? or not?
> 

The API docs are your friend :) 

http://java.sun.com/j2se/1.4/docs/api/java/lang/Thread.html#sleep(long)

So, being static, the method Gillmer pointed out will do just that on 
the current thread: 

Thread.sleep(500); 

Which is pretty simple :) 

--
Owen 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads