Troble Reading Vibration Sensor

The Arduino has a timer built in, called millis(), and it is used in the example that you linked in the OP. I suggested that you study that example carefully.

Also study the "blink without delay" tutorial that shows you how to create reasonably accurate timing intervals without (surprise!) using delay().

By using these techniques your program can VERY frequently check the switch (as in 10,000 to 100,000 times each second) and do other useful things at the same time.