add progressbar in startWirhTime function.