A voir également:
- Equuivalent du sleep() en visual
- Visual petanque - Télécharger - Sport
- Visual c++ 2019 - Guide
- Visual paradigm - Télécharger - Gestion de données
- Visual watermark - Télécharger - Photo & Graphisme
- Visual basic - Télécharger - Langages
3 réponses
Salut,
Doc win32
Donc Sleep sa marche (avec un S majuscule attention) suffit d apeller
windows.h
pour attendre x secondes suffit de faire x fois 1000 pour l avoir en milliseconde..
et voila le code test qui marche ..
Doc win32
The Sleep function suspends the execution of the current thread for a specified interval. VOID Sleep( DWORD dwMilliseconds // sleep time in milliseconds ); Parameters dwMilliseconds Specifies the time, in milliseconds, for which to suspend execution. A value of zero causes the thread to relinquish the remainder of its time slice to any other thread of equal priority that is ready to run. If there are no other threads of equal priority ready to run, the function returns immediately, and the thread continues execution. A value of INFINITE causes an infinite delay. Return Values This function does not return a value. Remarks A thread can relinquish the remainder of its time slice by calling this function with a sleep time of zero milliseconds. You have to be careful when using Sleep and DDE. If a thread creates any windows, it must process messages. DDE sends messages to all windows in the system. If you have a thread that uses a wait function with no time-out interval, the system will deadlock. Therefore, if you have a thread that creates windows, use MsgWaitForMultipleObjects or MsgWaitForMultipleObjectsEx, rather than Sleep.
Donc Sleep sa marche (avec un S majuscule attention) suffit d apeller
windows.h
pour attendre x secondes suffit de faire x fois 1000 pour l avoir en milliseconde..
et voila le code test qui marche ..
#include <windows.h>
#include <stdio.h>
void main( )
{
printf("debut\n");
Sleep(10000);
//s affiche au bout de 10 secondes
printf("fin\n");
}