Few things seem more absolute than death. But when it comes to actually pinpointing the moment when a person goes from alive to dead, drawing the line is a little more fraught.

The current medical definition of death is when the heart stops beating. In an interview with NYU Langone’s Sam Parnia, a pulmonologist, notes that from that point, it takes up to 20 seconds before brain waves are no longer detectable. According to Parnia, this sets off a longer chain of processes that leads to brain death. If you manage to restart the heart, which is what CPR attempts to do, you’ll gradually start to get the brain functioning again. The longer you’re doing CPR, those brain cell death pathways are still happening—they’re just happening at a slightly slower rate,” Parnia told Live Science .

In cases of cardiac arrest, doctors usually are not able to restore blood flow to the brain. That’s why the experiences of people who are successfully resuscitated are so fascinating.