Added timer function to check time of sorting