Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / December 2007

Tip: Looking for answers? Try searching our database.

Loop according to time

Thread view: 
TheTravellingSalesman - 03 Dec 2007 07:17 GMT
I want to loop something according to time.

I.e. suppose if time right now is 12:00 AM

I want the loop to run every 1 minute till the time is 12:30 AM  for
instance.

Pseudo-code below

While(Time != 12:30 AM)                                    /// <-----
But I want this loop for run every minute
{  System.out.println("Time right now is " + time);
}

How would I code something like that in Java
?
Roedy Green - 03 Dec 2007 17:23 GMT
On Sun, 2 Dec 2007 23:17:57 -0800 (PST), TheTravellingSalesman
<saad.zaman@gmail.com> wrote, quoted or indirectly quoted someone who
said :

>I want the loop to run every 1 minute till the time is 12:30 AM  for
>instance.

see http://mindprod.com/jgloss/timer.html
Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

TheTravellingSalesman - 03 Dec 2007 23:04 GMT
Thanks everyone for your help.

Sorry about the double post.

On Dec 3, 12:23 pm, Roedy Green <see_webs...@mindprod.com.invalid>
wrote:
> On Sun, 2 Dec 2007 23:17:57 -0800 (PST), TheTravellingSalesman
> <saad.za...@gmail.com> wrote, quoted or indirectly quoted someone who
[quoted text clipped - 7 lines]
> Roedy Green Canadian Mind Products
> The Java Glossaryhttp://mindprod.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.