How to stop/do something if analog value has not changed in a certain amount of time

How would you write if a value has not changed since last time?