I ran a bot for exactly 00:59:59 before hitting the stop button and got charged for 2 hours. This means that the second hour started before the hour mark. So when exactly does a new hour for a premium bot start?
So charging for premium bots isn't handled by the bot author's code, it's handled in the backend automatically by Runemate. Timers on bots are implemented by the bot author and are likely not exactly synced to Runemate's internal timer.
So if you run a bot and it takes a few seconds to load, it's possible Runemate's internal system already started the timer (I'm not certain), whereas the visible timer starts when the bot author's code has loaded. It's also possible there's a short delay between hitting stop and Runemate's internal system recognizing it as stopped.
I'd recommend stopping a minute or a couple before to be sure, if you're worried.