Yes the engine will update the timer once in each game loop. However, in a while loop, it won't advance a game loop unless you tell it to, so the while loop will just run within the same game loop, so the timer would probably never got updated within it.