"Når tingene brænder på"
It means sort of when things are close to burning/things are getting close to deadline and are going wrong. I am not looking for a direct translation but a saying that would mean the same thing.
(Basically I want to write a thank you to my mother for always being available for late night phone calls when I was panicking because there was no way I would finish my thesis in time. In Danish I would write: "Tak til min mor for at være der når tingene var ved at brænde på.)
P.S. Sorry if the question isn't 100% clear - my English skills decrease with increased sleep and lack of sleep and deadline is tomorrow :/