title: Swift time between run function
body: <p>I am nearly new to swift Xcode and I am building an app, when the end user is near a iBeacon hi will get a local push notification.<br>The problem I have is each time he comes near to it(if he got back and forward he will get each time he is near).<br>
  So I think to limit by time like 5 minuets of some like that.<br>
  I can not find in Swift how to limit a function to run in a time limit.(like 5 minutes)<br><br>
  Can some one point me in the  correct direction?<br><br>
  Thanks for the help.<br>
  I did try to work with a timer but it did not do the job for me.</p>