public WaitOptions withDuration ( Duration duration ) { checkNotNull ( duration ) ; checkArgument ( duration . toMillis ( ) >= 0 , "Duration value should be greater or equal to zero" ) ; this . duration = duration ; return this ; }
Set the wait duration .