The daily timer resets at a specific time and counts ONLY stars gained AFTER the daily event starts. So if you are in the middle of a battle and the daily timer resets, it will only count the stars you get as you receive them, not as a bundle of 4 or 5 stars from your battle.