• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Java Timer

 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I need to start the timer from zero. Some please assist me

The new Date is starting it from System Date.

 
Rob Spoor
Sheriff
Pie
Posts: 20545
56
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check out the methods in javax.swing.Timer. There are two that can set two different delays. Call one of those.
 
doruk turkoglu
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i really cant get question fully but if you want to display a date-time thing in panel or whatelse and want to start it from 0 (is it 01.01.2000 00:00) you should set time of your date with Date constructor
 
Campbell Ritchie
Sheriff
Pie
Posts: 49361
62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check the API, but I think "0" means 1st January 1970.
 
Meet Gaurav
Ranch Hand
Posts: 492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This helps me.. thanks for all your reply

This will starts with 1 hr and ends with 0(I mean after 1 Hr). Reverse timer



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic