What is the name of this device?
Metronome.
This device can be configured to produce a click sound at a regular interval and is mostly used by musicians in order to practice the rhythm of playing instruments.
The concept used by the device was firstly developed by Abbas ibn Firnas in the IX Century and the metronome was later patented by Johann Maelzel, in 1815.