Bonjour,

voila ma fonction sleep n agit pas et ma fonction random retourne tjrs la meme valeur

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
 
for(i=0;i<=client;i++){
<div style="margin-left:40px">switch(fork()){
<div style="margin-left:40px">case : 0{
srand(time(NULL));
temps = (rand() % 10) + 1;
sleep(temps);
printf("client arrive ds %d",temps);
processusclient();
}
...</div>}</div>}
Merci a vous !