calculate time script run