Would be useful in some cases. I am not sure how difficult this would be. BuildTimeoutWrapper uses BuildWrapper.decorateLogger for this purpose, which is too low-level (assumes access to an OutputStream for the whole build) and so is not available in a workflow (cf.
JENKINS-24673). There would have to be something like a TaskListenerDecorator which could be passed into BodyInvoker.withContext and interpreted by LogActionImpl, perhaps.
By the way for the use case originally reported here, it is arguably better to just impose a per-suite timeout in the test framework or test runner, such as in Surefire.