fixed ISR and add thread safe delayus