Stop the thread for a second

Hi
i want to stop the animation in my applet when the image reaches x position for only one second, then the animation should continue.
can you help me to find the suitable function?
thanx a lot.

well if your using threads why not use Thread.sleep(1000);

Similar Messages

  • Stop the execution for Some seconds

    I want to stop the execution for some second , Basically
    i want some funtion which will wait for specified period .
    it should work like Inkey() in foxpro .
    I have tried timer , pause but that does not solve the problem
    Thank you
    Regards
    Farukh

    find the library d2kwutil.pll (probably in c:\orawin95\tools\devdem60\demo\forms) and copy it and d2kwut32.dll to your application directory. Attach the pll to your form; now you can "interface" with windows. So for pausing you application use this in you form:
    win_api_utility.sleep(1000);
    the parameter takes milliseconds. so in the example it's 1000 milliseconds or 1 second.
    good luck!
    Tim

  • My MacBook Pro 13" won't turn on 90% of the time I try to get it running, and when it does turn on, even on a charger, it shuts down if I stop using it for 2  seconds and it won't turn back on. Should I replace the battery?

    My MacBook Pro 13" won't turn on 90% of the time I try to get it running, and when it does turn on, even on a charger, it shuts down if I stop using it for 2+ seconds and it won't turn back on. Should I replace the battery?  It doesn't hold a charge either...

    EmadJamal,
    the battery won’t melt because of long connection to the AC charger, although that has the potential of reducing the battery’s life.
    Do you have access to a second 60 W AC charger to test with your MacBook Pro, or access to a second 13-inch MacBook Pro against which your AC charger could be tested?

  • How to stop the thread?

    Hi,
    How to stop the thread in java. This is my program.
    import java.net.InetAddress;
    public class ThreadPing extends Thread {
         ThreadPing(String pingIP)
              super(pingIP);
              start();
         public void run()
              try
              String pingIP = Thread.currentThread().getName();
              InetAddress inet = InetAddress.getByName(pingIP);
              Boolean get=inet.isReachable(1500);          
              if(get==true)
                   System.out.println(inet.getHostName());               
              }catch(Exception e)
         public static void main(String args[])
              for(int i=1;i<=100;i++)
                   String pingIP = "192.168.1."+i;
                   ThreadPing tp = new ThreadPing(pingIP);
    Thanks in advance.

    The simplest way to stop all the thread is to make all thread daemons and exit the program when you want them to stop.

  • Hi I was using whatsapp on my iPhone5.I was not able go to the main menu by pressing the center button so I hold on to the button for 2 seconds.Then the whole display turned out to be black

    I was not able go to the main menu from whatsapp by pressing the center button so I hold on to the button for 2 seconds.Then the whole display turned out to be black & white. how can i fix it?

    Hello monicaa003,
    Thanks for participating in the Apple Support Communities.
    If your iPhone display turned black and white after holding down the Home button for 2 seconds, first try pressing the Home button again to go to the main menu (Home screen.)
    For reference, holding down the Home button for 2 seconds will trigger Siri if that feature is enabled:
    About Siri - Apple Support
    If pressing the Home button doesn't return you to the main menu, try restarting or resetting your iPhone:
    Restart or reset your iPhone, iPad, or iPod touch - Apple Support
    Additionally, if Whatsapp is not responding or working as expected, see the troubleshooting steps at this link:
    If an app you installed unexpectedly quits, stops responding, or won’t open - Apple Support
    Best Regards,
    Jeremy

  • URG & IMP: How does one stop the Thread.currentThread?

    hi,
    I want to stop the current thread.
    Presently teh code used Thread.currentThread.stop()
    However stop() has been deprecated
    Thread.currentThread.interrupt() doesnot seem to help.
    If I try Thread.currentThread.isAlive() post tehinterrupt, it doesnot work as desired and teh thread is still active...
    Any pointers????
    We have alreday tried using the boolean volatile varible to stop the thread as recommended by sun and since this is the currentThread, it cannot be assigned to null.
    Thanks
    Priya

    hi,
    I want to stop the current thread.
    Presently teh code used Thread.currentThread.stop()Whyever would a thread want to deliver a stop() to itself.
    Did you mean that you wanted to stop() a different thread?
    As indicated in the (depreaction) documentation for stop(), using interrupt()
    is a better idea. However, that requires you to have a protocol
    where the receiver of the interrupt then reacts in an appropriate
    manner, i.e. interrupt() can be the basis for cooperative
    thread termination; it can't merely replace a stop() call
    in an existing application without any other changes.
    >
    However stop() has been deprecated
    Thread.currentThread.interrupt() doesnot seem to
    help.
    If I try Thread.currentThread.isAlive() post
    tehinterrupt, it doesnot work as desired and teh
    thread is still active...
    Any pointers????
    We have alreday tried using the boolean volatile
    varible to stop the thread as recommended by sun and
    since this is the currentThread, it cannot be
    assigned to null.Think about what you are trying to achieve. Did you want
    to just do a Throw() out of the current method, with (or
    without )a corresponding Catch() in some outer context)
    so that the you can unwind in case of an exceptional
    condition and have the thread exit?
    >
    Thanks
    Priya

  • How to stop the process for some time

    I want to stop the process for some time can any one give the package or keyword or example for the same
    For suppose two programs A and B.. .B will run based on output of A. What i need is... When A is executed the process will stop for 5mins then B has to execute...

    You can use signals with DBMS_ALERT to "wake up" a procedure.
    Procedure A is something like this:
    DBMS_ALERT.REGISTER('B_FINISHED');
    do logic...
    when finished - send a signal
    DBMS_ALERT.SIGNAL('A_FINISHED','B you can start');
    now wait until B is finished
    DBMS_ALERT.WAITANY(...)
    continue logic hereAnd Procedure B is
    DBMS_ALERT.REGISTER('A_FINISHED');
    wait for a to finish
    DBMS_ALERT.WAITANY(...);
    do logic...
    when finished, signal A it can continue
    DBMS_ALERT.SIGNAL('B_FINISHED','A can continue');This is useful if u they need to wait for each other within the code. if they just need to wait - call B from A.
    Hope this helps.
    Edited by: Pyrocks on Nov 8, 2010 8:50 AM

  • HT1551 My apple tv (1st gen.) after showing the menu for few seconds shows the apple for a few seconds and then the menu is back, I can't do any operations on the menu

    My apple tv (1st gen) alternatly shows the apple for 30 sec. and then the menu for few seconds and the apple again, like it was restarting.  I can't do any operations

    Welcome to the user to User Technical Support Forum provided by Apple.
    Please do not post your Apple ID on a Public Forum. I have requested the Hosts remove your Personal Information.
    Thana Chootabtim wrote:
    'Your Purchase Could Not Be Completed'
    For assistance, contact iTunes Support....
    To Contact iTunes Customer Service and request assistance
    Use this Link  >  Apple  Support  iTunes Store  Contact

  • This is the thread for folks looking for work.

    And unfortunately, as of next Friday, I will be in urgent need of work.  I found out this week that my contract has been cut.  :-(  I have experience in help desk, technical training, IT management, systems administration, project management, and PBX administration.

    This is the thread for folks to post in when they're looking for work.  Let's use our professional networking contacts to help each other find jobs.  Feel free to list open positions separately as well.
    This topic first appeared in the Spiceworks Community

  • I recently bought the new Iphone 4S on the Bell network.  I subscribe to visual voicemail, and when I get a voicemail I can listen to them but when I go to delete them it freezes the screen for a second or two and goes back to the homescreen.

    I recently bought the new Iphone 4S on the Bell network.  I subscribe to visual voicemail, and when I get a voicemail I can listen to them but when I go to delete them it freezes the screen for a second or two and goes back to the homescreen. Anyone else having this problem?  I've called Belland they're clueless about this, and Apple support doesnt seem to know much about it either.

    I was mislead as well.  It turns out that visual voicemail is only partially supported by Bell.  You can only playback voicemail.  It doesn't show the caller ID either.  You still have to call your VM in order to delete messages (which kinda defeats the purpose).  According to Bell tech support they're "working on it" but I wouldn't hold my breath.

  • I put my iPod charging, but it wont charge. The Apple logo appears on the screen for five seconds and then it goes off again. Afterwards, it does it again and again and again. I can leave it 1 hour or day charging and it will be doing this the whole time.

    I put my iPod charging, but it wont charge. The Apple logo appears on the screen for five seconds and then it goes off again. Afterwards, it does it again and again and again. I can leave it 1 hour or day charging and it will be doing this the whole time. What should i do????????????????????????????????????????????????????????????????????????????? /

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer                            
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
      Apple Retail Store - Genius Bar                              
    and
    Not Charge
    - See:      
    iPod touch: Hardware troubleshooting
    - Try another cable. Some 5G iPods were shipped with Lightning cable that were either initially defective or failed after short use.
    - Try another charging source
    - Inspect the dock connector on the iPod for bent or missing contacts, foreign material, corroded contacts, broken, missing or cracked plastic.
    - Make an appointment at the Genius Bar of an Apple store.
    Apple Retail Store - Genius Bar                          

  • How to stop the program for a while?

    Hi,
    I've created a small prog that the only thing it does is to ask for a given password before granting access to certain data. It works fine on the WTK emulator (from Sun of course), but it crashes on a Nokia 6600 due to a bug in the Nokia's MIDP2.0 implementation. Now I need to trace/find the exact point of the program where it crashes (in the mobile phone - where the app gets closed). MY PROBLEM is that I need to insert into the program some kinda code that stops for a while the program saying "I am at the Nth step and running fine", but I can't stop the program from executing, because I can't find out how, I've tried the
    display.setCurrent( someAlert );but it doesn't seem to stop the program like it would in an HTML JavaScript page. And:
    Thread.currentThread().sleep( 2000 );doesn't stop for some reason the program either..
    Can anyone give me a tip or a workaround of how I can temporarily stop the prog? Please help

    Try putting the current thread to sleep right after setting the alert:
    yourAlert.setTimeout(3000);
    display.setCurrent(yourAlert);
    try {
       Thread.sleep(3000);
    catch(...)

  • I am sampling a signal at 1kHz for every 1 second. How do i average the signal for N seconds?

    I am sampling a signal at 1kHz for 1 second. After one second of pause, i sample again for 1 second at 1kHz. If i do this for Nth time, how do i average the signal over the 1 second period?

    Anyway you need to have the data to compute the average... and usually you don't get the data point-by-point unless it is very low frequency acquisition.
    If it is the case, you have to update your 2D vector point by point and then compute the average after each new point (much slower process indeed). You keep say 20 vectors of data and fill in the data (1, 2...20) and then( 1,2..20), so you compute the average on the last 20 acquisitions
    (don't forget the rating)
    Doc-Doc
    http://www.machinevision.ch
    http://visionindustrielle.ch
    Please take time to rate this answer

  • How can I download the software for a second time without a backup but with  the serial number?

    Hi guys,
    stupidly my hardware got broken and I've missed to do a backup for the programs. May it's a stupid question but how can I download the Lightroom software for a second time? I've got the serial number for this, but can't find a link without buying it again....
    Thanks a lot for your help!!!!
    Cheers,
    Hannah

    Lightroom - all versions
    Windows
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Windows
    Mac
    http://www.adobe.com/support/downloads/product.jsp?product=113&platform=Macintosh

  • When I press"mail", it opens the emails for 2 seconds, then reverts back to the icon screen

    When I press "mail" to open emails, they stay pen for 2 seconds, then reverts to the icon screen...what gives?

    Have you tried basics from the manual?
    restart, reset, restore

Maybe you are looking for

  • How to change the 'Default operating mode' of a mapping on the repository and not from the client

    Hi everybody, I am using OWB 11.2.0.3 and under the mapping's configuration property, I have the necessity to change the Run time parameter "Default operating mode" to SET_BASED in almost all my mappings. Because I have 745 mappings in which the Defa

  • Header Text in MV45AFZZ

    Hi, I have a requirement that I need to capture an order header text in user exit save document (in mv45afzz) and download that info in a file (This file contains shipment info which needs to the sent to carrier provider and it needs to be instant -

  • Help. when I link html pages, they show up much larger in browser

    Hello, I designed 5 pages. When I look at them all through the browser individually in Dreamweaver CS4, they show up all correctly with a fixed width of 950. The problem comes when I link my navigation buttons to the html pages. When I click onto the

  • Making field mandatory dynamically

    HI, Can anybody  send sample code for following logic? i am having three fields as select options. consider BSART BUKRS EBELN In selection screen if BUKRS is initial, I want to change EBELN as mandatory. else if BUKRS is not initial, EBELN is not man

  • Bapi/FM to get bom change info

    hi! i need to get one bapi/FM to get bom change info with ECN!   the function like S_ALR_87012976 (tcode). thank you very much!