While doing a bit of battling, I found using certain moves like Uproar, Rollout, Thrash, Petal Dance, or any move that locks the user into an attack for multiple turns on teams that use nothing but the move Healing Wish, could potentially have very long delays between actions in a battle. Even using the /endbattle command will take a while to completely get out of a battle.
How to replicate this bug:
1) I found making an NPC have a team of 6 lvl 50 Blisseys with just Healing Wish works well to replicate this bug.
2) Get a Pokemon that is much faster than Blissey with said moves, they will most likely cause this bug.
3) Go into a battle and use Uproar, Rollout, Thrash, Petal Dance or anything similar and level up while doing so. If done correctly, you may see that it may take a long while to do an action during the battle.
-Side note, it seems trying to speed up the battle at any time may make some actions take even longer to complete.