How long does it take to go into and out of deep sleep

I’m using a device to count pulses using the wake pin, and going into deep sleep between pulses. How long does it take an imp to wake and start executing code after receiving an event on the wake pin, and how long does it take to go to deep sleep after server.sleepuntil() is called (assuming no wifi connection)?
Thanks.

Wake is ~10ms as I remember.

Sleeping is pretty fast too when the connection is down (use imp.deepsleepfor/until not server.sleepfor/until as you don’t want to bring up the link to tell the server you’re going to sleep if you’re already offline!). I’ve not timed it, though.

Do note that you cannot enter sleep if the wake line is high - the imp will just re-wake immediately. This is an STM32 limitation.