Can a mapping be setup to only output if its input is active for a set amount of time?

Can a mapping be setup to only output if its input is active for a set amount of time?

is it possible to add something like
"IF I tilt for 1 sec, execute."
I want something I don't accidentally trigger tilt while using my mouse. So I want to do some conditional tilt where I have to hold it for 1 sec to trigger the event, else doesn't trigger.

Thank you.