Question about gametime

I was wondering from which moment the gametime starts counting down.The moment I log in and I get the "Connected" message?Is it counted down the moment I'm on the character screen or when I log into the game? And what about queues on the server, are those counted to the gametime as well?