proper timer duration calculation