Can I cast Shield against an attack that hits me during a Time Stop?

Suppose an enemy casts Time Stop and then makes an attack against me, rolling a 20 to hit against my 16 AC. Normally, I could cast Shield to cause this attack to miss. And of course, this attack also ends the Time Stop. So, does time start flowing "soon enough" for me to cast Shield against the attack that ends the Time Stop spell?