Savelog for rendering times in 2.7.x and 2.8.x

I want an addon /script to save rendering times to an output file preferably as txt for blender 2.79 and 2.8x, i found some scripts but they are obsolete…