Print rendering time?

This is something I’ve been searching for for a long time. Is it possible to have blender write the time it took to render an animation to the console (or somewhere else), just like it displays the time it took to render an image in the render window?
Currently I use a small self-written python script that does this:

#Render animation with writing time
import Blender

time1 = Blender.sys.time()
time2 = Blender.sys.time()
dtime = int(time2-time1)
print("Time taken to render animation: "+str(dtime)+" seconds")

But since this is such a simple thing, I guess I have missed an already existing button somewhere that enables this automatically.
Any ideas what I missed?

if you render an anim it will

also if you render from the command line it will

For me it only prints the render times of the individual frames, which is very impractical to all add up if you have an animation of 1k frames (and the difference in rendering time between two different frames can be quite large).
The reason I asked is that sometimes I run a test render of an animation when I’m asleep, checking for a lot of things including rendering times to see if the scene needs improvement.

I haven’t tried that yet to be honest, I’ll give it a try this night.