Getting this is a bit advanced and needs templating work.
Are you sure you want to go there?
Basically you will need to capture the time of the trigger which you can get the variable name for using trigger attribute or looking in the trace to get the variable names and then subtract the now() when it is done.
It’s something I’m NOT good at so I’m not going to do it for you.
You should look for people doing similar things in other community posts. There is also this that might help you but you will still need to feed it the information. GitHub - Petro31/easy-time-jinja: Easy Time calculations for Home Assistant templates.
Also this isn’t a Blueprint question at all, so changing the topic to templates or automations might get you more eyes on the problem.