Can i make a method to wait for 2 mins before executing in java??

can i make a method to wait for 2 mins before executing??
i mean when i execute a method ....it has to wait for 2 mins before finally executing...
can i do this in java????
Thanks,

Sure, put this at the beginning of the method.
try
    Thread.sleep(120000);
catch (Exception ex)

Similar Messages

  • How can I make Process.waitFor() just wait for a limited period?

    For example,
    Process prc=Runtime.getRuntime().exec(cmd);
    prc.waitFor(some seconds);
    if(prc.exitValue() != 0){
    // the subprocess hadn't terminated normally in some seconds,
    // so just forcilly kill it.
    prc.destroy();
    Is there any way to do this?

    waitFor does not have a timeout parameter, but you can start a Timer or thread to interrupt your waiting thread when the timeout expires. Then, waitFor will end, throwing an InterruptedException that you can catch.

  • How can I make a while loop wait for input boolean?

    Hi.
    I'm trying to control a robotic arm with labview for my undergrad dissertation, and I have a decent polar coordinate control panel made, but there is one problem; it checks for changes in the coordinates every five seconds, while I want it to only check on the touch of a button (ie, go!, I've changed your coordinates!). The changes are calculated with a while loop comparing the last value of theta, x and z in a while loop with the current one. I can't find a way of putting that into a case structure. If there is a way of making the while loop progress at the push of a button, I think it would work. The VI's attached below.
    Thanks in advance for any help.
    Cathal Scanlon
    ps, sorry about the mess, I'm going to reorganise the while loop into 2 if I can get the control button working.
    Message Edited by CatScan on 02-08-2007 02:45 PM
    Attachments:
    Polar coord assignment1.vi ‏142 KB

    Have you tried using an event structure? To use one, right click on the structure to add an event. Set the event as whatever button you wish to monitor and set the event to "Value Change". If you put this inside a while loop any time the button is pressed, the event structure will run the contents inside the loop. There are a number of options to have the event structure activate.
    *** Warning! I'm probably the last guy you want answering your labVIEW questions, but I figured I might be able to help.

  • How can I download a transfer without waiting for it be all transferred?

    How can I download a transfer without waiting for it be all transferred? Thanks.

    Thanks, that now makes sense. Once an item enters the download queue, the user cannot remove it. Either let it complete the download (easiest) or contact the iTunes Store customer support department through the Contact page (select the category and subcategory closest to the issue you're reporting and you'll find either an "Express Lane" button - just follow the instructions to get to the contact form - or an "Email Us" button) and ask them if they'll remove the item(s) from your queue for you.
    Regards.

  • Make coded ui tests wait for onfocus event during playback - SharePoint 2010 InfoPath form

    I recorded a coded UI test of a SharePoint 2010 site hosting an InfoPath form. The combobox on the infopath form loads the items on onfocus event. It seems that the  coded ui test do not wait for the onfocus event to complete and tries to select the
    item and fails with the error
    The web page could not be accessed. If the page is refreshing, please wait until the page refreshes and then perform actions on it. 
    how can i make the Test to wait till it completes the onfocus event and then select the item.
    one approach i applied was  
    bool bReady = false;while (!bReady)
    try
    uID4ComboBox1.WaitForControlReady();
    // Select 'RMA2' in 'D4' combo box
    uID4ComboBox1.SelectedItem =this.CreateProposalParams.UID18ComboBox1SelectedItem;
    bReady =true;
    catch
    Playback.Wait(1000);
    But i have a lot of combo boxes which makes this solution difficult to implement.
    Thanks in advance.

  • Can i make a new apple id for my iphone if i forgot the old one

    can i make a new apple id for my iphone if i forgot the old one

    Not if you have FindMyiPhone enabled.
    Aren't you usign the same AppleID/Password as you use to post here?
    Or did you already create multiple AppleIDs? and you want to create yet another?
    -> Find your AppleID

  • Do any of you experience Im having with my ipad? I can't make a comment in Facebook for older posts and I can't open numerous comments from old posts of my friends. but everything works perfectly when I use laptop. is there problem between apple and FB?

    do any of you experience Im having with my ipad? I can't make a comment in Facebook for older posts and I can't open numerous comments from old posts of my friends. but everything works perfectly when I use my laptop(non-apple). is there problem between apple and FB?

    Facebook apparently has their site coded poorly for tablets with touch screens. Try using the Facebook app. It is not perfect either but it is better than view in a browser lately.

  • How can I make Adobe Reader 9 open for incoming PDFs instead of Acrobat 5.0?

    How can I make Adobe Reader 9 open for incoming PDFs instead of Acrobat 5.0?

    Hi,
    Assuming that you have Reader 9.3.4 already installed on your machine, you can try the following to make Reader 9.3.4 as the default PDF opening application:
    1. Right click on any PDF on your system and click on the "Open With" Option in the context menu that appears. In case you get another submenu, click on Chose Program in that menu. (In case you do not see any "Open With" option, then hold down the Shift key and right click on the file)
    2. Click on Browse button in the dialog that appears, and select Reader 9. Make sure that you select the checkbox for "Always use the selected program to open this kind of file"
    3. Click on OK.
    This will make Adobe Reader 9 as the default viewer for all PDFs on your system.

  • How can I make "No Proxy" the default for accessing the internet?

    How can I make "No Proxy" the default for accessing the internet?

    *Tools > Options > Advanced > Network : Connection > Settings
    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

  • How can i make Apple review a refund for a delaminated bottom case of my macbook november 2009 model? They more than implied that it is a design flaw anyway

    How can i make Apple review a refund for a delaminated bottom case of my macbook november 2009 model? They more than implied that it is a design flaw anyway. They make it so hard to send a possible review of such.

    http://www.apple.com/support/macbook-bottomcase/

  • You can only make a complete transfer posting for the quant?

    Dear All,
    The error message "You can only make a complete transfer posting for the quant"  displayed when I Create a TO in LT03 for a Delivery.  While the total available qty = 200, I am only creating TO for qty = 5.
    What settings need to be done to allow partial quatity?
    regards,
    Shetty

    Hi,
    Please check the below config in your system:
    LE>WM->Interfaces>Shipping>Define Shipping Control-->Shipping Control per Warehouse Number
    Here Put check for partial picking .
    Hope it will help you.
    Rgds,
    Kris.

  • How can I make my apple ID valid for purchases other then the Canadian iTunes Store?

    How can I make my apple ID valid for purchases other then the Canadian iTunes Store? I wanted to download the "Wath abc family" app and it said it had to switch me to the american store because the app isnt available in Canada yet. Once it switched me I put in my apple ID and password and thats when it said that my apple ID is only valid in the canadian store and it switched me back. 
    1)
    2)
    3)

    To make purchases in the Mac App Store/iTunes Store for any particular country, you must be a legal resident of that country and supply a credit card issued by a bank in that country with a verifiable billing address in that country. Do you also make those qualifications in the US?
    But as a side note, as one who has that app, you can only watch both ABC and ABC Family shows if you have an account with a US cable or satelite TV company with which to sign into the app. Otherwise you don't qualify to watch shows with it.

  • Can I make a static screen saver for an LCD screen?

    Can I make a static screen saver for an LCD screen? In researching screensavers the other day, I read an article saying that moving images were no longer necessary since that was important for cathode monitors and LEDs have no such problems but the iMacs are LCD. Do LCD get "Burn in"?
    I need to know as I am making wallpaper and screensvers for the company I work at.

    LCD's normally are not affected by any burn in, just use the computer. It's a wise idea to put the display to sleep when it's not in use.  You can set the setting in System Preferences - Energy Saver. I set my display to sleep after 15 minutes of not being used and it goes black, I've done this for 8+ years and have never had any display issues.

  • Sometimes my ipod brings up my sisters apple id even though its mine in my ipod settings how can i make it so it only brings up mine?

    Sometimes my ipod brings up my sisters apple id because shes synced her ipod on my laptop before, but its my apple id in my ipod settings how can i make it so it only brings up mine?

    The usually indicates that you have some media on yur iPod that was purchased using here iTunes account. It usually happens only with apps like when they have to be updated.  Check for that and delete apps purchased with her account.

  • 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.

Maybe you are looking for

  • 2014 mac mini loosing internet connection

    Hi, my relatively new mac mini with most current system suddenly started to loose it's internet connection. WiFi or wired makes no difference. It works for a bit then I get time outs, spinning balls and nothing works anymore. All other devices on the

  • Transferring Certain iPad/iPhone Data from MBP to a new MBA

    Hello: Long story short is I have a new iPad and an iPhone 4s currently synced to my late 2009 MBP. I will be selling this machine here this week after doing a clean install of Lion and am trying to find a working solution to transfer just my iTunes

  • Httpd version

    Hi I want to install the httpd apache... i installed the version httpd-2.0.63.tar and httpd-2.2.11.tar in that i checked httpd.conf there is no mod_proxy.... please let me know what is the version to install the httpd(mod_proxy)... Regards

  • Vic-2fxs,vic-2fx0

    what is the difference between VIC-2FXS and VIC-2FXO? Can them just be used in WIC slots of cisco 2600? thanks in advance

  • Moderators could you add this to the Help & Terms of Use

    Hello, I just found it interesting that this was not included in the Help & Terms of Use information. Could you add, the next time they are updated, the time limit a user has to edit a post. I have seen this a number of times come up in the Discussio