Added timing routines to grid scan