I’m not a teacher.
The tense distinctions of the gerund, like those of the participle, are not absolute but relative.
1. The Indefinitite Gerund Active and Passive denotes an action simultaneous with the action expressed by the finite verb; depending on the tense form of the finite verb it may refer to the present, past or furure.
He can swim for any number of hours without tiring.
She walked on without turning her head.
2. There is also a perfect (or past) form of gerunds. The past form of gerunds is formed by using having + past participle. This kind of gerund suggests that the gerund happened before something else.
When one action happens before another action, we use having (done) for the first action.
Having found a hotel, we looked for somewhere to have dinner.
The Perfect Gerund denotes an action prior to that of the finite verb.
She denies having spoken with him.
She was guiltily conscious of not having answered her Ladyahip’s note, inclosed in Miss Pink’s letter.
She really had been crying….out of anger at having been driven so hard.
However, a prior action is not always expressed by a Perfect Gerund; in some cases we find an Indefinite Gerund. This occurs after the verbs to remember, to excuse, to forgive, to thank and after the preposisions on (upon), after and without.
I don’t remember hearing the legend before.
You must excuse my not answering you before.
I thank you for your restraining me just now.
After walking about ten yards, he found the hat among the leaves.
She passes through and disappeares in the pantry without noticing the young lady.
The Perfect Gerund may also be used after the above mentioned verbs and prepositions.
He did not remember having been in that room.
After having denied herself to everybody, Miss Rachel, to our astonishment, walked into the midst of us of her own accord.
They parted at Cohen’s door without having spoken to each other again.