To wait for 5 seconds

How do I make a program to "stop" 5 seconds and then execute again?
I dont want to use the Timer Class or the thread's wait() method since they are over-complicated in my case.

Thread.currentThread().sleep(5000);

Similar Messages

  • COMMIT WORK and WAIT FOR n SECONDS

    I am designing a WebDynpro Java application.  It makes an update call followed immediately by a display call which should return the data that was just updated.  However, it appears that there is some DB latency involved and the data takes a few seconds to update.  The application displays old data if the display call is performed too quickly after the update call.
    All suggestions I could find point to having a Thread sleep on the Java side for a few seconds or have a WAIT FOR n SECONDS and/or COMMIT WORK AND WAIT statement in the ABAP function module.  Neither of these solutions is acceptable in a company-wide application where database latency could vary significantly based on traffic.
    I tried all kinds of functions (i.e. BAPI_TRANSACTION_COMMIT) as well as various forms of COMMIT WORK... nothing except a WAIT works correctly.  There must be a statement out there that waits for the database write to be complete!  How is this solved without picking an arbitrary WAIT time?  What am I missing?
    Thanks in advance!

    You can write the other way.
    declare one variable
    data : wa_try type i.
    wa_try = 10. -> set as 10 ,even you do not get value ,keep on incresing.
    after BAPI FM
    you can call comitt fm.
    after BAPI_TRANSACTION_COMITT
    just use simple logic.
    do wa_try.
    select * from table into table
                                  where record = bapi fm record ( You get in RET2 Message).
    if sy-subrc eq 0.
    exit.
    endif.
    Thanks
    Seshu

  • "CJS-30199 The CTC classes were not found after waiting for 900 seconds."

    Here's the snippet of the sapinst_dev.log
    I am trying to install Central Instance on a RedHat Enterprise 4 server (32bit). But stuck at
    this stage.
    TRACE      [iaxxejsexp.cpp:188]
               EJS_Installer::writeTraceToLogBook()
    2007-05-10 20:19:48.093 FSPath(/usr/sap/LN1/DVEBMGS02/j2ee/cluster/server0/apps/sap.com/tclmctcutilbasic_ear/servlet_jsp/ctc/root/WEB-INF/classes/com/sap/ctc/util/ConfigMainExt.class).isExisting() done: false
    TRACE      [iaxxejsexp.cpp:188]
               EJS_Installer::writeTraceToLogBook()
    2007-05-10 20:19:48.093 NWJavaInstance._waitForFile() - elapsed time = 910 timeout = 900
    TRACE      [iaxxejsexp.cpp:188]
               EJS_Installer::writeTraceToLogBook()
    NWException thrown: nw.usageTypes.ctcSyncWaitTimeout:
    The CTC classes were not found after waiting for 900 seconds.
    ERROR      2007-05-10 20:19:48
               CJSlibModule::writeError_impl()
    CJS-30199  The CTC classes were not found after waiting for 900 seconds.
    TRACE      [iaxxejsbas.hpp:460]
               EJS_Base::dispatchFunctionCall()
    JS Callback has thrown unknown exception. Rethrowing.
    ERROR      2007-05-10 20:19:48 [iaxxgenimp.cpp:736]
               showDialog()
    FCO-00011  The step configCAF with step key |NW_Doublestack_CI|ind|ind|ind|ind|0|0|SAP_Software_Features_Configuration|ind|ind|ind|ind|15|0|NW_Usage_Types_Configuration_AS|ind|ind|ind|ind|0|0|NW_CONFIG_CAF|ind|ind|ind|ind|1|0|configCAF was executed with status ERROR .
    Your help is much appreciated.
    Thanks and Regards,
    Satish/

    Hello Satish
    Please do following checklist:
    1. Check that the J2EE engine is up and running (e.g. log in with Admin)
    2. Check that the following application is running:
         Visual Admin => Cluster => Server => Services => Deploy
         Select "Application" and look for "sap.com/tclmctcutilbasic_ear
    3. Try to continue installation
    It could be helpful to apply the patch for CTC as per note # 938261
    before restarting.
    and also try to add more memory allocation.
    If issue persists,
    - I'd like to know which installation DVD/CD number being using ?
    - The contents of the LABEL.ASC file.
    - The installation guide reference and title used for this install ?
    - SAPINST version ?
    - Oracle version/patch level ?
    - Operating system version/patch level ?
    See also:
    Note # 851251 - SAP NetWeaver 2004s Installation on UNIX
    Thanks
    Kenny

  • Why do I get a black screen telling me to wait for 40 seconds and then to 'skip ad'?

    I installed a Firefox update and since then, when I try to connect to a website, I almost always get a black screen telling me to wait for 40 seconds and then to 'skip ad'. This is very irritating and a waste of time. There are no ads to skip. Why is this happening and how can I stop it?

    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
    You can check the connection settings.
    *Firefox > Preferences > Advanced > Network : Connection > Settings
    *https://support.mozilla.org/kb/Options+window+-+Advanced+panel
    If you do not need to use a proxy to connect to internet then try to select "No Proxy" if "Use the system proxy settings" or one of the others do not work properly.
    See "Firefox connection settings":
    *https://support.mozilla.org/kb/Firefox+cannot+load+websites+but+other+programs+can

  • Always need Disconnect power, press the power button wait for 10 seconds...

    I bought a HP computer for a couple of years ( Pavilion a6695it  ) It always works well. But in recent days, I can not start up it. I tried pressed power button on the front of the computer, nothing happend. Then I searched in hp site. finnally, I find this article http://h10025.www1.hp.com/ewfrf/wc/document?docname=c00241069&tmp_task=solveCategory&cc=it&dlc=it&lc...
    In english version the article is here: 
    http://h10025.www1.hp.com/ewfrf/wc/document?docname=bph06788&cc=us&destPage=document&lc=en&product=3...
    Power supply light is on or flashes
    Perform the following steps, in order, until power is restored or it is determined that there is a hardware failure:
    CAUTION:This product contains components that are easily damaged by ElectroStatic Discharge (ESD). To reduce the chance of ESD damage, work over a non-carpeted floor, use a static dissipative work surface (like a conductive foam pad), and wear an ESD wrist strap that is connected to a grounded surface, like the metal frame of a PC.
    Disconnect everything from the computer, including the power cord.
    With the power cord disconnected , press the power button on the front of the computer and wait for ten seconds.
    This is work for me. But now, my computer always need this methond that it can be started up.
    Disconnect power -> press the power button and wait for ten seconds -> then the system will  start up
    So my question: where is the problem? Which part is broken and i should replace? Thanks.
    regards,
    Youli
    This question was solved.
    View Solution.

    Hello youlichika,
    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I understand that you are not able to power on your desktop, and I would be happy to assist you in this endeavor! 
    In following the document for Troubleshooting Power Supply Issues, were you able to follow steps 3-9? If so, what were the results?
    If you have come to the end of the document, and you still have to drain the power from the computer to power it on, you can find a replacement part (5188-2627) through one of the sites available by following this link.
    I hope this helps!
    Best Regards   
    MechPilot
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks” for helping!

  • Wait for x seconds

    I just wish the video to wait for 3 seconds before starting,
    what action script command should I use?
    Thanks,
    Dario

    OK, the word video is confusing. I just wish to use as2 oe
    as3 (whichever is the best).
    I want the timeline to hold itself for 3 seconds and after
    that start the usual play. I am not loading a video, I am using the
    word video to refer to the normal execution of the .swf file by the
    flasf player.
    So, with this new data can you tell me how to tell the flasf
    player to wait 3 seconds before playing the .swf file? thanks.
    Dario

  • Wait for 30 seconds to execute the two functions

    Dear Sir
    I have a package in which two functions are written.Once the first function is executed I wanted the second function to wait for 30 seconds to execute the second functions.Could you please tell me how can I do it?
    Regards

    Go to $ORACLE_HOME/rdbms/admin and read the header:
      --  DESCRIPTION
      --    These routines allow the user to request, convert and release locks.Granting privileges on USER_LOCK is, at least according to the docs I've read, intended to limit the amount of damage a user with execute privs can do.
    You can, of course, find SLEEP in four different Oracle packages:
    * dbms_backup_restore
    * dbms_drs
    * dbms_lock
    * user_lock -- note the granularity is different from dbms_lock and the othersI have documented all of them here:
    http://www.morganslibrary.org/reference/sleep.html
    I think people point those that ask questions to DBMS_LOCK only because it is the one best known.

  • Can a BPEL process wait for a second web service call

    Hi,
    My BPEL process is an asynchronous process, so the first web service call kicks off an instance of the process.
    what i want is somewhere down in the process i can put a "receive" shape to pause the process and wait for another web service call to come in, once the "receive" shape gets the second web service call, the process continues on.
    Is that a valid thing to do on BPEL?
    i don't seem to be able to get it working.
    i could change the WSDL for the BPEL process to publish two operations, the default "initiate" and another one called "continue", they both accept the same type of request message.
    but when i test it, the BPEL process just can't accept message at the second operation, it always creates a new instance to handle the web service calls, even when the call is targeting "continue" operation.
    Any ideas?
    Thanks in advance!

    I was just about to give up after the last post but then the "pick" shape hit my eye somehow ("thank God", that's all i can say)
    and it did the trick, the "pick" shape can wait for an incoming call from a partner link.
    so what i can achieve is this,
    the first web service call sends some thing like
    <Root><CorrelationId>1</CorrelationId><Content>first name</Content></Root>
    on the "initiate" operation, just like calling an "initiate" method in java code
    the BPEL instance gets initiated, reaches the "pick" shape and stops
    then a second web service call comes in as
    <Root><CorrelationId>1</CorrelationId><Content>last name</Content></Root>
    on the "continue" operation, again just like calling a "continue" method
    it works!

  • Adobe crashes on printing - unless I open the file and wait for 10 seconds

    We are having printing issues with Adobe Acrobat X or Xi Standard and or Professional on client PCs running Windows 7 32 Bit OS.
    If we open a PDF file and request a printed copy Adobe crashes. If we open the documnet and wait 10 seconds before printing the document it prints perfectly well and Adobe does not crash.
    What is causing this problem?  I haved tried to uninstall and reinstall Adobe Pro but this does not fix the problem.
    I've tried changing the printer type to direct IP printing but this has not helped.

    Hello youlichika,
    Welcome to the HP Forums, I hope you enjoy your experience! To help you get the most out of the HP Forums I would like to direct your attention to the HP Forums Guide First Time Here? Learn How to Post and More.
    I understand that you are not able to power on your desktop, and I would be happy to assist you in this endeavor! 
    In following the document for Troubleshooting Power Supply Issues, were you able to follow steps 3-9? If so, what were the results?
    If you have come to the end of the document, and you still have to drain the power from the computer to power it on, you can find a replacement part (5188-2627) through one of the sites available by following this link.
    I hope this helps!
    Best Regards   
    MechPilot
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos, Thumbs Up" on the right to say “Thanks” for helping!

  • This is a hint to anyone who cannot find their airprint printer from their ipad:  after 10 hours of trying everything imaginable, i can now print directly from my iPad by turning off the bluetooth in settings and waiting for 30 seconds.  presto!

    after spending a full day and a half trying everything imaginable, i finally found a way to get my ipad to find my new airprint capable  printer.  I could print from email or the cloud, but not directly from my ipad.  After reading a discussion about bluetooth printers, i turned off bluetooth in settings, waited 30 seconds, and voila!!  I was able to print directly from my ipad.  Try it if you are having troubles

    Greetings,
    I've never seen this issue, and I handle many iPads, of all versions. WiFi issues are generally local to the WiFi router - they are not all of the same quality, range, immunity to interference, etc. You have distance, building construction, and the biggie - interference.
    At home, I use Apple routers, and have no issues with any of my WiFi enabled devices, computers, mobile devices, etc - even the lowly PeeCees. I have locations where I have Juniper Networks, as well as Aruba, and a few Netgears - all of them work as they should.
    The cheaper routers, Linksys, D-Link, Seimens home units, and many other no name devices have caused issues of various kinds, and even connectivity.
    I have no idea what Starbucks uses, but I always have a good connection, and I go there nearly every morning and get some work done, as well as play.
    You could try changing channels, 2.4 to 5 Gigs, changing locations of the router. I have had to do all of these at one time or another over the many years that I have been a Network Engineer.
    Good Luck - Cheers,
    M.

  • Cannot not log on without a Waring: Unresponsive Script notice. This is not acceptable as I have to wait for it to open, close it and wait for a second notice of error.

    I up graded last week and now I get a warning notice of unresponsive script followed by a second notice of type error every time I try to open FireFox and other websites through FireFox. This is causing me delays I cannot not afford. How to I correct this? I would like to keep using FireFox but cannot if this isn't corrected ASAP. Below is not the notice I receive.

    Hi Corel
    Thank you for your reply
    However I need the lower case version for some sites and the upper case version for the site in question? To make matters worse this site does not allow you to change your log on name unless it is in the form of an e-mail address
    So what I need is Kostas for this site and kostas saved for other sites and allow me to choose which one I want to use
    How do I do this please
    I have no bother with this on Win Internet Explorer but I like Firefox
    Mind it may be as simple as deleting The appropriate entry and resetting with Kostas instead of kostas?
    But I would appreciate knowing the correct solution from an expert

  • Is the wait for a second iPad mini worth it? And just curious, most new apple devices are priced at the previous models price, correct?

    I'm not trying to speculate, but most new devices are priced at thee previous models original price? Correct me if I'm wrong please.
    Thanks!

    Since nothing in terms of a new mini has been announced, there would be no way anyone could answer that question. As for pricing, in the recent past that has tended to be the pattern, but again, could easily change.
    And there is no way to answer the question that does not involve speculation.

  • I installed an update and since then, when I try to connect to a website I get a black screen telling me to wait for 40 seconds and then to 'skip ad'.

    Weird! It suddenly seems to have corrected itself. I will get back if it happens again.

    Thank you for responding. I'm not sure if my complete original message came through. It was just today that an automatic update notice came through, and I installed the update that was offered. So I have to guess that version — 10.1.10 — is the latest version that's available to me. My OS is 10.6.8. Again (in case the complete message isn't appearing), I'm on an older Mac, specifically MacBook 2.1. Perhaps this is the problem, and I never should have updated a few years ago. If so, I wonder if there's any way I can go back to that earlier version that worked well for me, rather than the last few versions, which have not.

  • Tried to login on cc desktop,with correct user/password - it just waits for 10-12 seconds, and message the You've been signed out.

    This is the first time on this pc I have installed the cc desktop, and when I logging in it waits for 10 seconds , then the message You've been signed out.
    My username is [email protected]
    please advice

    Frankbergodal please utilize the steps listed in You are no longer signed into your Creative Cloud applications to resolve the current sign out error.

  • IPad unresponsive after iOS 8.02 update, doesn't show up in iTunes, hardware reset (home and standby buttons both held down for ten seconds) not working

    I have a 32GB iPad mini that was purchased new in June of this year. A little while ago, I started the iOS 8.02 download while it was plugged into a wall socket using an official apple wall to USB plug and an official apple thunderbolt cable. I then left for 25 minutes to get some food.
    On coming back, I discovered the iPad with a black screen showing the apple logo. I thought this was just an ordinary part of the update, it was restarting or something after installation, so I thought nothing of it. Then, after another minute or two, the screen flashed blue and then went completely black.
    Puzzled, I waited for another second and the apple logo reappeared as if the iPad was restarting again. However, after a few minutes, this happened again. This has been going on for the last half an hour, and I was wondering has anybody experienced this before.
    As I stated in the title, it won't show up in iTunes, and the hardware reset or whatever it's called doesn't work. Also, bear in mind I had issues syncing it with iTunes the night before and it also seemed to crash a few times last night, restarting the iPad and bringing it to the blank screen with the apple logo for a few seconds before going to the lock screen. That didn't happen at all this morning though.
    The iPad is not jailbroken, however, it does have licenses for gba4iOS, which is still installed on it, and a VPN license installed on it by the Hola app, which I deleted but never bothered deleting the license for. Any help would be greatly appreciated.

    Hi Colin how are you?
    I updated my IPAD yesterday and have the exact same problem.
    Itunes does not recognize my ipad. Home and standby also doesnt work.
    Also have the blue thing every few minutes and the apple logo but it never goes beyond it.
    Have you solved the issue?
    IPAD AIR

Maybe you are looking for

  • Please help. im using a macbook pro versian 10.6.8 every website works on the laptop except for facebook for some reason anyone know why?

    its been a couple days now since my macbooks been playing up someone please help me. ive got firefox, google chrome etc none of them are loading facebook every other websites works fine, facebook takes 5 minutes to load and it goes to a mobile websit

  • Why increased spam in email?

    First of all, apologies for posting this here but I didn't find the 'Apple Mail' section that I seem to remember used to be previously available in Support.  (right?) I've had a significant increase in spam in the last couple of weeks.  From a couple

  • Significance of Delete Statement

    Hi All, Will the statement Delete dbtable from table i_tab, delete all records of dbtable for one single occurance of record in i_tab. for eg: if dbtable as 10 records with a key field value 1 and the i_tab has one single record for the key say value

  • Running in to Exceptions when implementing AjaxAutoSugest

    Hi, Seeing exception when running an application implementing AjaxAutoSugest which is documented @ http://www.oracle.com/technology/products/jdev/tips/mills/AjaxAutoSuggest/AjaxAutoSuggest.html and the exception is <Oct 12, 2009 11:51:38 AM CDT> <Err

  • Managing photos on ipad

    I have copied photos to my ipad 3 through a sd card reader, I then added them to a number of new albums but when I try to delete them from all the imported photos the only option I have is to delete them from all albums, apple staff belfast could not