Chapter 14: Problem 32
How are the time intervals between a Timer object’s action events measured?
Short Answer
Expert verified
Answer: Time intervals between action events are measured using Timer objects by specifying the period argument when scheduling the TimerTask with the schedule() method. For example, if we call schedule(task, 0, 1000), the task will be executed immediately (as the delay is 0), and then it will be executed every 1000 milliseconds (1 second) thereafter. The Timer object will handle the timing and repeatedly execute the run() method of the TimerTask at the specified interval.