It's a good solution, just be clear on how you write it so you don't get confused later (variable naming).
time variables have to be global.
private boolean idleFor(int millis){
if(myPlayer().isAnimating() || myPlayer.isMoving())
{
timeSinceAction = System.currentTimeMillis();
}
else
{
timeSinceIdle = System.currentTimeMillis();
}
return timeSinceAction + millis < timeSinceIdle;
}