Completion of sonoff basic r2 programme duration in power failure?

I purchased a Sonoff basic r2 device. I want to operate the water pump with this device. I want to run the water pump for 5 hours on some days and turn it off. There are power outages in the power line where the water well is located, although not very often. For example; Suppose I run the device for 5 hours and set it to automatic shutdown. While Sonoff R2 is running, there is a power outage for 1 hour and then the power is restored, will Sonoff R2 calculate the outage time and complete the 5 hours of operation time? (I’m triggering the contactor with Sonoff R2.)

Thank you.