not really sure what you're asking. but time is now part of the io interface, so you can pretty easily write your own io implementation that just stubs out to the stdlib's default io content and has custom time functions if you want to try something funky. This is pretty close to what you are asking for (and in terms of functionality, equivalent). I say go for it and see what happens, report back!
Thank you for your response. So time as you mentioned can be made explicit.
I am probably looking for something like the request context with timers and cancellation signals propagating through the call chain like in gRPC but more fine granular.
So you could implement arbitrary response times of functions. So you could say like:
This whole request must finish in 5 seconds, otherwise abort.
And these 5 seconds can be made very low so that you reach latency of NUMA vs Single CPU.
I don't know how you call this, maybe "latency budget"
> time is now part of the io interface [...]
Nice, didn't know that! Sounds like this could be extremely useful for some of the simulators we work on (though we mostly work in C/C++).