Added: Better method for measuring the time