timer tasks "hogging" avoidance
like in the subject:
I know that java.util.Timer is not appropriate for managing longer tasks, but I
have a problem that actually needs sth like that: I have to periodically (with a
constant period) check for mail on a certain server. When I make a new timer
with period = 15 sec. and checking mail takes 20 seconds than next mail check
is executed instantly, when I want it to be executed after 15 sec. javax.swing.Timer
has a very useful method restart, which could do the thing, but this timer is even
worse when it comes to longer tasks execution, not mentioning that I use swing to
build gui of my application so I don't want to mess up with EDT.
So is it any other solution than while (true) { mailCheck(); Thread.sleep(); } ?

