TrainingInterval.Builder.SetMinimumInterval(Duration) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the minimum time interval between two training runs.
[Android.Runtime.Register("setMinimumInterval", "(Ljava/time/Duration;)Landroid/adservices/ondevicepersonalization/TrainingInterval$Builder;", "", ApiSince=35)]
public Android.AdServices.OnDevicePersonalization.TrainingInterval.Builder SetMinimumInterval(Java.Time.Duration value);
[<Android.Runtime.Register("setMinimumInterval", "(Ljava/time/Duration;)Landroid/adservices/ondevicepersonalization/TrainingInterval$Builder;", "", ApiSince=35)>]
member this.SetMinimumInterval : Java.Time.Duration -> Android.AdServices.OnDevicePersonalization.TrainingInterval.Builder
Parameters
- value
- Duration
The minimum time between task runs. It is used only for recurrent tasks, where it must be at least one millisecond.
Returns
This builder, with the minimum interval assigned.
- Attributes
Remarks
Sets the minimum time interval between two training runs.
This field will only be used when the scheduling mode is TrainingInterval.SCHEDULING_MODE_RECURRENT. For a recurrent task, use an interval of at least one millisecond. The builder does not validate this value, but FederatedComputeScheduler.Schedule can throw an IllegalArgumentException if the interval is less than one millisecond.
Please also note this value is advisory, which does not guarantee the job will be run immediately after the interval expired. Federated compute will still enforce a minimum required interval and training constraints to ensure system health. The current training constraints are device on unmetered network, idle and battery not low.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.