Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes how to count total times that a task is executed by a Timer? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "how to count total times that a task is executed by a Timer?" Watch "how to count total times that a task is executed by a Timer?" New topic
Author

how to count total times that a task is executed by a Timer?

raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 551
Hi
Thank you for reading my post
is there any way to count how much time a task is executed by a Timer?


thanks
Ken Blair
Ranch Hand

Joined: Jul 15, 2003
Posts: 1078
Why don't you just increment a variable every time the task is executed and check that?
raminaa niilian
Ranch Hand

Joined: Jul 14, 2005
Posts: 551
Hi
Thank you for reply.
can you please explain, where i should put that variable?
for example my code looks like :





thanks
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: how to count total times that a task is executed by a Timer?
 
Similar Threads
Call action class from timertask's run method
Timer.start issues
Timer
What is the Linux command to find the created timer daemon
Scheduled Task in Struts