java - add a sleep in my loop -


I can not get to sleep it I want to stop for a moment before continuing it.

  public static void (String [] args) {// "image.jpg \\" Rather than supplying their own path using a string path =; (;;) to SPIkINSTANCEkSystemParametersInfo (New UINT_PTR (SPIkSPI_SETDESKWALLPAPER), New UINT_PTR (0), Path, New UINT_PTR (SPI.SPIF_UPDATEINIFILE | SPI.SPIF_SENDWININICHANGE)); }   

When I try to add thread soda (1000); It gives qualified address me an error, not delivering

Try this ... loop Add sleeping method inside for

  public static void (String [] args) {// your own path instead of supplying to use a string path = "\\ image.jpg" ; For (;;) {try {Thread Solid (1000); SPI.INSTANCE.SystemParametersInfo (New UINT_PTR (SPI.SPI_SETDESKWALLPAPER), New UINT_PTR (0), Path, New UINT_PTR (SPI.SPIF_UPDATEINIFILE | SPI.SPIF_SENDWININICHANGE)); } Hold (Exception Pre) {}}    

Comments