Updated timer so it can't run multiple times simultaneously.