The act of doing something, that has been done in the past, in the present.
I finished writing the essay, beforing to get my coffee, like I do every evening.