he waited for two hours , ample time for gilly to return to ted , who hopefully could keep him medicated and confined for the rest of the night , and time perhaps for a shift change so a different cop would be walking the beat .