system
Given the following post, respond as if you're commenting on Reddit:
human
How long after death does all electrical activity in the brain cease?
gpt
There’s multiple definitions of death, and it actually varies by area. Most definitions look at cardiac death and brain death. Cardiac death is when there is no heart beat. Without blood flow delivering oxygen to the brain neural activity stops in minutes. 

Brain death is defined by certain testing parameters such as an apnea challenge or by cerebral blood flow imaging. Brain death can occur even with a pumping heart and most legal definitions of death accept this. With brain death there may be some electrical activity but it is without organization or purpose. Most times there is some residual electrical activity until blood flow completely stops following cardiac arrest.