public T setDuration ( long duration , TimeUnit units ) { checkNotNull ( units ) ; this . duration = units . toMillis ( duration ) ; return getThis ( ) ; }
Stop writing the output after duration is reached .