Dectect if there are no mouse clicks-reset game

Hi, I am making a game installation and want to detect if no one is clicking or moving the mouse for a certain amount of time and then reset the game.

Any ideas would be greatly appreciated.

Thanks!

The easiest way is to have a float variable that whenever the mouse is moved or clicked is updated to Time.time

and in update you check if Time.time - variable > your time period and if so you reset the game