Commencement and continuance of the right of private defence of the body is defined under section 102 of ipc. Provisions under IPC section 102 explained here:
What is Section 102 IPC:
The right of private defence of the body commences as soon as a reasonable apprehension of danger to the body arises from an attempt or threat to commit the offence though the offence may not have been committed; and it continues as long as such apprehension of danger to the body continues.
Section 102 IPC Explanation:
This section means private defence of body starts at the point where fear or apprehension to body starts and it lasts till the point where apprehension or fear continues.