fix timer scheduling with delay of 0; optimize write of update metadata