Added a return value to the processRequest function so that it returns the processing time