Search code examples
c#wpfmvvmpropertieslivecharts

Time elapsed since a property was last accessed


I have a property which gets and sets a list of integers, which I use to draw a chart using LiveCharts.

The values are being passed from an external hardware device. Sometimes the values may be unavailable due to a hardware problem, during which no values are being passed to my app, and so the property is not being fired. I still want to plot the values, but as NaN.

How can I detect if a property has not been accessed/set in my code, say for 10 milliseconds?


Solution

  • Okay the thing I was searching for is a Timer . The ElapsedEventHandler serves the purpose I was looking for.