How to prevent users touch continuously

I need some ideas for these questions

  1. How to prevent users touch continuously. For example, I shoot bullet continuously, I want there is a delay about 1 second even I press touch continuously. I mean touch continuously not touch and hold.

  2. How to detect if the hold touch event?

  1. a simple 2-state machine can work out this
  2. u need modify the source code, add a timer to record how long the touch holds