In last night's Scotland-Sri Lanka match, Scotland lost their last wicket after 43.1 overs, 363/9 to 215/10 (43.1). At that point, averaging just under 5 runs per over, Scotland would have reached a point around the 47th over, where it would have been no longer (realistically) possible to win the match.
For example, say they had not been dismissed in 43.1, and instead scored 5 (more) runs in that over, leading to 220 at 44.0. They then scored 5 more runs for the next several overs; at 47.0 they have a score of 235. With 18 balls remaining in 3 overs, they now trail by 128; but even if they hit sixes on every single ball, they could only score 108. Yes, there might have been extras, but hardly twenty of them.
Had this happened, would they continue to bat (pointlessly)? (I realize that in some circumstances, total runs scored might factor into tiebreaks for going on, but clearly not in Scotland's case.) Would it have been by choice (similar to declaring an innings at end in a Test match, though that is usually for the opposite reason) or by rule?
In a limited overs match (an ODI or similar), is there a criteria for ending a game prematurely when it is determined to be no longer possible that the team batting second can win?