TimeBetweenUpdates Property
Collapse the table of content
Expand the table of content

SensorBase(Of TSensorReading).TimeBetweenUpdates Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets or sets the preferred time between CurrentValueChanged events.

Namespace:  Microsoft.Devices.Sensors
Assembly:  Microsoft.Devices.Sensors (in Microsoft.Devices.Sensors.dll)

'Declaration
Public Property TimeBetweenUpdates As TimeSpan

Property Value

Type: System.TimeSpan
Type: TimeSpan. The preferred time between CurrentValueChanged events.

Different devices are capable of different rates of providing sensor data. You can query this property after setting it to see what value is actually being used. The default value is 2 milliseconds.

If the sensor is not present, a System.InvalidOperationException is thrown when you access this property. Before accessing this property, use the IsSupported property for the particular sensor to determine if the device is present and handle the InvalidOpertionException gracefully in case that sensor does not exist.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Windows Phone

Show:
© 2017 Microsoft