My goddaughter is barely 3 years old and I visit and babysit her often, and have her mother's full permission to use time outs when I feel they are appropriate. She is usually pretty well behaved, but she is not afraid to express herself, and that can include her displeasure at time outs. Occasionally when she gets a time out, when the time out is over she will intentionally do whatever it was that got her in time out just to show her defiance. This is far more common when she is tired (I do try to be more lenient about punishment when she is tired, but there can still be times when she does something that I can't ignore)
So for instance if she is in time out for hitting as soon as I put her down she will do a half hearted slap at me while still crying. I'll repeat that hitting isn't allowed and that she is in time out again, doing a quicker count down until time out is over. She will be crying and upset during this. As soon as time runs out I'll move and tell her that her time out is over (and that I love her, I always try to do that after a time out), and she will again try to slap at me while still upset and crying.
The slap isn't to hurt, it's usually half hearted with little force. However, if she misses me (which I'll try to ignore at times), she will do it again until she hits. It's clear it's an act of defiance just to prove she can still do whatever it is she was told she shouldn't, and to show she is upset with the whole situation of time out.
If I let her she would repeat this cycle over and over again. I've usually resorted to getting another caregiver to come 'rescue' her and comfort her, usually her mother or another family member is around when I'm visiting, though not always. This works since she will run to them after time out instead of being defiant so she won't do anything that warrants a repeat time out. However, I'm trying to figure out a good way to break this cycle when I'm babysitting her by myself; one that doesn't have me ignoring her attempt at a hit (or other defiant behavior), since I don't want to encourage it.