calculate computation time