• Post Reply Bookmark Topic Watch Topic
  • New Topic

Timer Function  RSS feed

 
sampath surineni
Greenhorn
Posts: 29
Android Chrome Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello

I am developing a program. For that I want to include a functionality that will make a statement execute at the time user specifies.

For example if the user give the input as 2 hours and 22 minutes. I want a statement to execute after that time.

Please advice me how to do this in java

Thank you
 
Darryl Burke
Bartender
Posts: 5167
11
Java Netbeans IDE Opera
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There are three classes in the standard JDK named Timer. Have you looked at them to see whether any will be suitable for your task?
 
sampath surineni
Greenhorn
Posts: 29
Android Chrome Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Darryl Burke wrote:There are three classes in the standard JDK named Timer. Have you looked at them to see whether any will be suitable for your task?


Thank you I'll go through them
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!