The length of time a shocking process takes can't be predicted. It certainly won't be done in 5 hours. The sooner you catch a bloom, the quicker the shocking process but it's going to be at LEAST 24-36 hours if not 3 days to a week or more for a bloom that has been existing for any length of time.
For example, I recently had a tiny itty bitty bloom that became apparent when the pool suddenly lost 100% of the chlorine before the day ended. Big red flag, this does not normally occur so I started watching the chlorine after dosing it back to high/target. It lost 2ppm in the dark so I began shocking, maintained for most the rest of the day till I ran out of chlorine for a few hours (let a kid swim since it was under shock level). Borrowed a bottle of bleach from the neighbor and resumed shocking, but by then the sun was off the pool and it had stopped losing chlorine anyway. Performed the OCLT that night and passed with .5ppm loss. Total time from beginning to shock till passing the OCLT, about 36 hours.
As you can see, even the smallest bloom takes time to clear properly. It also requires attention, regular testing, and regular additions of bleach after each test so that shock level is consistently maintained the entire time. Sunlight will consume some chlorine not related to shocking in any way, thus expect larger losses during the day.
You might want to brush up on pool school, and in particular the information about shocking and algae so you understand how and why maintaining shock level works (and why not maintaining doesn't).