How time is accounted?

How do codingame compute the time of your program for each loop?
I take one example. In the skynet medium puzzle, I get a timeout on the first loop. the constraint is to be less than 150ms.
In C++, I instrument the code using std::chrono::high_resolution_clock in order to track where the time is spent.
I find that it is spent in the first “cin” before the game loop !!! it’s already around 150ms.
the rest of the program takes quite no time. But the algorithm is quite complex and does some computation. But the code runs fast.
My feeling is that the program is first scanned to account for example the number of instructions.
Based on this and the corresponding language, it chooses if the program is going to be considered in time-out or not.
In case of time-out, the program which launches and feeds our program just wait enough to create the timeout.
So, how the time is accounted?

You have more or less 1s before the game loop and then the 150ms to process the game loop

Good info, thanks.
By the way, I found the error, the program was in time-out because, there was an endl missing in one of cout.