PLEASE HELP I DONT KNOW THE ANSWER!

Riddle: You wake up in a room with only one door and no windows. On the ground is two specially made peices of string, a candle and a piece of paper. The string are at different lengths but both take exactly 60 minutes to burn. On the piece of paper is says that the door nob is electrified and cannot be touched. It also says that at 60 min the sprinkler will turn on,and u will eventually drown. It also says that at 45 minutes the power will turn off and you can open the door. But it only turns of for 5 seconds. With no way to tell if it's been 45 minutes or not, how do you successfully escape the room.

Ps( folding and cutting the pieces of string will have no effect on the time it will burn)