setDurationMillis

@NonNull
open fun setDurationMillis(@IntRange(from = 1) durationMillis: Long): @NonNull LocationRequestCompat.Builder(source)

Sets the duration this request will continue before being automatically removed. Defaults to Long.MAX_VALUE, which represents an unlimited duration.

Note: This parameter will be ignored on platforms below Android Kitkat, and the request will not be removed after the duration expires.