# How can I programmatically abort an operation that is taking too long?

I have a function f, over whose source code I have no control. Is there a way for me to decorate f so that if the evaluation time on an input exceeds, say, five seconds, the returned value is something like Missing["EvaluationThresholdReached"]?

TimeConstrained[f[whatever],5,Missing["EvaluationThresholdReached"]]