If it's wakeup alarm, it takes about 5-10 minutes for my higher cognitive functions to get back online. If someone tells me something during this time, I most likely wil not remember it at all. And it doesn't matter if I have slept 20 minutes or 10 hours, I'll still be as groggy.
If there's a loud sound in the middle of the night, it's almost instantaneous.
Back in the day my not-so-tech-savvy colleague bought a Windows 8.1 laptop that had a touchscreen. After two days she brought it to me and asked me if I could "rip this hellspawn out of this computer".
Before wiping it we checked if there was anything to backup and the ~30 minutes I spent using Win 8.1 were hideous. It was the only time I ever had to use it, of which I am very grateful.