programmation

programmation - Java - Programmation

Marsh Posté le 18-10-2005 à 13:03:05    

j'ai un problème sans doute simple mais dont je ne mesors pas :et j'ai besoin d'une réponse rapide(cas urgent)
comment faire 'attendre' pendant une certaine période l'execution d'une commande.
Une commande équivalente à sleep().

Reply

Marsh Posté le 18-10-2005 à 13:03:05   

Reply

Marsh Posté le 18-10-2005 à 13:16:18    

Thread.sleep

Reply

Marsh Posté le 18-10-2005 à 13:17:12    

Code :
  1. public void sleep(long secondes){
  2.    long t1=System.currentTimeMillis();
  3.    while((System.currentTimeMillis()-t1)<(secondes*1000)){
  4.       ;
  5.    }
  6. }


 
Problème déjà abordé, le minimum aurait été de cliquer sur le bontou "rechercher" ...

Reply

Marsh Posté le 18-10-2005 à 13:17:57    

mais biensur ...

Reply

Marsh Posté le 18-10-2005 à 13:23:55    

iohack> Tu veux deux giffles ? [:itm]


---------------
Now Playing: {SYNTAX ERROR AT LINE 1210}
Reply

Marsh Posté le 18-10-2005 à 13:37:20    

merci pour la reponse et surtout les conseils

Reply

Marsh Posté le 18-10-2005 à 13:38:37    


 
pelle à clous ?


---------------
JE JE SUIS LIBERTINEEEEEEEEEEE JE SUIS UNE CATINNNNNNNNN §§§§§§§§
Reply

Marsh Posté le 18-10-2005 à 14:06:55    


 
[:mlc]  
 
 
 :sweat:

Reply

Marsh Posté le 18-10-2005 à 14:08:05    

Pelle à clous + 2 giffles + BAN ? [:dawa]


---------------
Now Playing: {SYNTAX ERROR AT LINE 1210}
Reply

Marsh Posté le 18-10-2005 à 14:11:18    

ben quoi ? on trouve bien cet algo dans le noyau Linux, c'est qu'il doit être correct non ? [:dawa]


---------------
trainoo.com, c'est fini
Reply

Marsh Posté le 18-10-2005 à 14:11:18   

Reply

Marsh Posté le 18-10-2005 à 14:12:24    


 [:psywalk]


---------------
Light is right
Reply

Marsh Posté le 18-10-2005 à 14:13:45    


[:rofl]    
    [:rofl]
           [:rofl]
                   [:rofl]
 
 
 
ha ben s'il a déjà été abordé, t'as pas du être là.. ou alors on aurait bien ri http://marinenet.mite.com.au/images/naked.gif


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
Reply

Marsh Posté le 18-10-2005 à 14:16:20    

[:el g]

Reply

Marsh Posté le 18-10-2005 à 14:19:55    

http://www.lgml.net/HFR/owned/wtf13.jpg


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
Reply

Marsh Posté le 18-10-2005 à 15:37:25    


 
Serial Coder ? c'est toi ?


---------------
J'ai un string dans l'array (Paris Hilton)
Reply

Marsh Posté le 18-10-2005 à 15:39:17    

[:rofl]


---------------
Hey toi, tu veux acheter des minifigurines Lego, non ?
Reply

Marsh Posté le 18-10-2005 à 15:57:48    


http://masklinnscans.free.fr/4chan/you_master.gif
 
(edit: accessoirement, rechercher simplement "Java sleep" dans google donne la bonne info dès la première réponse hein [:pingouino])


Message édité par masklinn le 18-10-2005 à 16:00:02

---------------
I mean, true, a cancer will probably destroy its host organism. But what about the cells whose mutations allow them to think outside the box, and replicate and expand beyond their wildest dreams by throwing away the limits imposed by overbearing genetic r
Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed