Sopakramam nirupakraman ca karma tat-samyamadaparantajnanam aristebhyo va. (III-23)
Sopakramam = active; nirupakramam = dormant; ca = and; Karma = action; tat = that; samyamat = by samyama; aparanta = ultimate end; Jnanam = knowledge; aristehbyo va = or by omens.
By performing samyama on the two types of actions, active and dormant, one can get the knowledge of the time of death or by performing samyama on omens.
This sutra is about the siddhi of knowing the time of death. Why should one like to know that? Our literature is full of stories where this siddhi is utilized. In real life there are incidents where dying people could know before hand their time of departure from this world. According to our belief, dying in a particular muhurat is considered auspicious in so many ways. That is why the great Bhishma chose his time of death.
A sort of fear grips most of the dying persons when they are about to leave their bodies. This paralyzing fear, according to some, makes the dying person stunned, unconscious. It is possible to get rid of cycle f death and birth if one can maintain the awareness at the time of death. But how difficult it could be, one can guess from the day to day experience of being pulled to sleep (a miniature death) unconsciously. One of the yogic practices is to go to bed with awareness but we will not talk much about that here.
Coming to the sutra under discussion, karmas are of two types-sopakrama and nirupakrama i.e. active (prarabadha, that part of some total of the karmas which is to the exhausted in this birth) and nirupakrama (sanchita karma, the total stock). A yogi, with his insight, can perform samyama on his present karma and know when they are going to exhaust and thus infer the time of his death when his last karma, the last breath is exhausted. It is well known that this very birth, assuming this body is due to past karmas. And when the last karma is over, death occurs.
There is another way of knowing the time of death. And that is by inferring the omens around. Again there are stories abound predicting the death of a great person by certain omens. How far this knowledge is accurate and weather there are people at present to have correct interpretation in modern times, we don't know. However, Maharishi patanjali also seems to have made passing reference to it. More authentic is the scientific method of performing samyama.
As far as a sadhaka is concerned, he does not bother about these things except the simple thing that one should have pure thoughts or, better, silence and peace with awareness at the time of death. That will happen when we go to bed with peace every night with some silent prayer.