title: Cyclically test a variable
body: <p>I'm developing an app and I need to verify if a given variable has the same value for a given time. How can I do it? Maybe a solution can be to use a thread and manually force this to test my variable each 100 millisecond (with the equivalent of the C function "wait" or something like that). Is it correct? I think (and hope) there's a more elegant solution. </p>
  
  <p>Specifically, I'm working with beacons and I need to trigger a method when a beacon is immediate to my device for an amount of time.</p>