Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Once paused, Timertask counts at twice the pace  RSS feed

 
Eamon Williams
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a timer on my jframe, with three buttons controlling it (start/pause/stop). Once the timer has started (starts counting), then the user presses pause (pauses counter), once the user 'unpauses' the counter counts at double the rate it was before....



The flag 'timerFlag' is set to true and the method called for 'Start'. And false and the method called for 'Pause'.

This probably isn't the best way to code this (i'm a newbie!) but its seems to work and is good enough for what I need, only after the pause is the problem.

Any help greatly appreciated, Cheers
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!