Added function to record time of solving