Changed the timeouts to use the java platform independent timer.