How to know if there is any scheduled timers currently?
There is TimerQueue to manage a queue of Timers, but all stuff is private or package private.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Access modifiers don’t stop reflection. So you can do something like:
The member names were digged from JDK source code. Private stuff is not intended to be accessed this way, so this may break anytime. There’s no robust way to do this. It’s a pity that
Timerdoesn’t provide such API.