You are the referee and you are the sole timekeeper, so you decide when time is up.
Try to use a bit of common sense and let the attack reach its natural conclusion, or have the ball run out of play.
If a team scores dead on the last kick, let them kick off again then blow and say that time...