Wiesz co robi?
Sleep(1000);
Zastanów się co robi Sleep, i dlaczego w jednej funkcji, 1 programie się tak dzieje. Jeśli poczytasz trochę i zrozumiesz co jest wątkiem w twoim programie i co robi "Sleep" którego używasz- to już bedziesz wiedział
The sleep () function causes the program or the process in which it is called, to suspend its execution temporarily for a period of time in seconds specified by the function parameter. Execution is suspended until the requested time is elapsed or a signal or an interrupt is delivered to the function.