I've resigned myself when I have no time left on the clock. It has to be timed perfectly.
How?

I'm asking about it but I know on the app if you leave the game it can be treated as a resignation. So, if it was on one of the apps, it's possible they left the app at the same time as white's clock hit 0 and the resignation result took precedence.
how my friend lost a game when he resigned but his opponent is with 0 seconds on the clock?????????????????