Add delay task function