After testing on RDring, I found that remove element sometime fails and the time complexity to remove a timer is linear; the alarm manager uses a TreeSet that iterate all elements for deleting.
Then, I look source of PriorityQueue and guess maybe can use it to store timer list. But I am very surprised that, though the deleting in PriorityQueue is in constant time, the inserting of an element in Priority queue is also linear. They didn't use any tree or something binary search technique to speed up the insertion.
If I want to remove fast, then PQ but insert slow. Otherwise I can use TreeSet for insert in log-N but delete slow. Is there any tree or heap that support both insert, delte and find in log-N speed ?