15.05.2013 Views

Clase Thread - docencia de la ETSIT-URJC

Clase Thread - docencia de la ETSIT-URJC

Clase Thread - docencia de la ETSIT-URJC

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Thread</strong>.sleep()<br />

El método <strong>Thread</strong>.sleep() es un método estático<br />

<strong>de</strong> <strong>la</strong> c<strong>la</strong>se <strong>Thread</strong>: suspen<strong>de</strong> <strong>la</strong> ejecución <strong>de</strong>l thread<br />

que lo ejecuta durante el número <strong>de</strong> milisegundos<br />

especificado<br />

<strong>Thread</strong>.sleep () tiene una cláusu<strong>la</strong> throws<br />

InterruptedException, pero run() no, por lo que<br />

hay que tratar <strong>la</strong> excepción<br />

La ejecución <strong>de</strong>l bucle while no es muy precisa en<br />

cuanto al periodo

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!