Need a simple bit of code that will cause a somewhat slow running time

Hey everybody. I have a class that computes the running time of code but the code I put in always comes up 1 or 0 millioseconds. I want it to be a little longer. Ive been putting in long math problems to no avail. Any suggestions?

or...
int seconds = 5;
      try {
          Thread.sleep(seconds * 1000);
     } catch (InterruptedException e) {
          // TODO Auto-generated catch block
          e.printStackTrace();
     }

Similar Messages

  • [svn:fx-trunk] 12077: Although Spark RichText does not support link formats , modifying compiled FXG to not generate ActionScript code that will cause compile time exceptions .

    Revision: 12077
    Revision: 12077
    Author:   [email protected]
    Date:     2009-11-20 18:16:32 -0800 (Fri, 20 Nov 2009)
    Log Message:
    Although Spark RichText does not support link formats, modifying compiled FXG to not generate ActionScript code that will cause compile time exceptions.
    Removing references to Flex Builder 3 in RPC.
    QE notes: N/A
    Doc notes: N/A
    Bugs:
    SDK-24305 - Link format property nodes cause errors on RichText in FXG 2.0
    SDK-24322 - A couple references to Flex Builder 3 in Flex 4 LangRef (and code comments)
    Reviewer: Deepa
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-24305
        http://bugs.adobe.com/jira/browse/SDK-24322
    Modified Paths:
        flex/sdk/trunk/frameworks/projects/rpc/src/mx/rpc/xml/XMLDecoder.as
        flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/fxg/FlexFXG2SWFTranscoder.java

  • Need help with WMI code that will send output to db

    'm new to WMI code writing, so I need some help with writing code that we can store on our server. I want this code to run when a user logs into their computer
    and talks to our server. I also want the code to:
    * check the users computer and find all installed patches
    * the date the patches were installed
    * the serial number of the users computer
    * the computer name, os version, last boot up time, and mac address
    and then have all this output to a database file. At the command prompt I've tried:
    wmic qfe get description, hotfixid
    This does return the patch information I'm looking for, but how do I combine that line of code with:
    wmic os get version, csname, serialnumber, lastbootuptime
    and
    wmic nicconfig get macaddress
    and then get all this to output to a database file?

    Thank you for the links. I checked out http://technet.microsoft.com/en-us/scriptcenter/dd793612.aspx and
    found lots of good information. I also found a good command that will print information to a text file.
    Basically what I'm trying to do is retrieve a list of all installed updates (Windows updates and 3rd party updates). I do like that the below code because it gives me the KB numbers for the Windows updates. I need this information so my IT co-workers &
    I can keep track of which of our user computers need a patch/update installed and preferably which patch/update. The minimum we want to know is which patches / updates have been installed on which computer. If you wondering why we don't have Windows automatic
    updates enable, that's because we are not allowed to.   
    This is my code so far. 
    #if you want the computer name, use this command
    get-content env:computername
    $computer = get-content env:computername
    #list of installed patches
    Get-Hotfix -ComputerName $computer#create a text file listing this information
    Get-Hotfix > 'C:\users\little e\Documents\WMI help\PowerShell\printOutPatchList.txt'
    I know you don't want to tell me the code that will print this out to a database (regardless if it's Access or SQL), and that's find. But maybe you can tell me this. Is it possible to have the results of this sent to a database file or do I need to go into
    SQL and write code for SQL to go out and grab the data from an Excel file or txt file? If I'm understanding this stuff so far, then I suspect that it can be done both ways, but the code needs to be written correctly for this to happen. If it's true, then which
    way is best (code in PowerShell to send information to SQL or SQL go get the information from the text file or Excel file)?

  • HT3209 Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work

    Purchased DVD in US for Cdn viewing. Digital download will not work in Cda or US? please help with new Digital code that will work

    You will need to contact the movie studio that produced the DVD and ask if they can issue you a new code valid for Canada. Apple cannot help you, and everyone here in these forums is just a fellow user.
    Regards.

  • Ac. Have CS5 for Windows. Switched to Mac.  What do I need to do to get photoshop that will work on Mac?

    Have CS5 for Windows. Switched to Mac.  What do I need to do to get photoshop that will work on Mac?
    Thanks,
    Martin

    Contact Adobe sales or Adobe Customer Service.
    You would have to upgrade to CS6 for Mac as a "cross-grade" or platform swap.
    They will not allow you to simply swap for CS5 Mac, because CS5 is no longer sold or supported.
    You can either upgrade to CS6 Mac by way of platform swap for some $200, or you can join the Cash Cow subscription mode.

  • TS1292 how to activat a itunes code that will not redem

    how to activat a itunes code that will not redem

    I was having the same problem with a card that I received as a gift. Finally, I realized that it's an APPLE gift card and not an iTunes gift card. They are different and one will not work for another. The Apple card is used for hardware, software, cases, headphones, etc that you can buy in store or online. The iTunes card can only be used for music, apps, videos purchased through iTunes.
    But as long as it is in fact an iTunes card, the only other thing I've read about it not activating is to wait a few days and try it again. Sometimes it takes a while for the store where it was purchased from to send the activation info to Apple and read it as a valid code. I guess it doesn't happen instantaneously when scanned at the store.

  • Is it possible to write a as3 code that will search for particular file in the loacal disk

    Is it possible to write a as3 code that will search for particular file in the loacal disk

    Not for a web-based design

  • I need an Ipad app web browser that will emulate internet explorer as my MLS real estate system only uses internet explorer.  Why is Atomic full version not available in the app store  is there another browser that will do this

    I need an iPad app web browser that will emulate internet explorer as my MLS real estate system uses only internet explorer.  Why does Atomic no longer sell the full verison.  What web browser can I use?

    Probably none. It's very possible that the reason the MLS required Internet Explorer is that they use technologies (such as Active-X) that are proprietary to Microsoft and so would not be available from the iPad even if a browser will report itself as being Internet Explorer.
    You can try iCab Mobile, though, and see if it will work for you:
    http://itunes.apple.com/us/app/icab-mobile-web-browser/id308111628?mt=8
    It has the ability to identify itself as other browsers, so if the site is only blocking other browsers and not depending on IE's technology, iCab might work. There could be problems, though, even if the site lets you in.
    Hope this helps.

  • Is there a DJ app for the Ipad that will read the "start" and "stop time" setting for each individual song, as they are set in the song Options screen in Itunes?

    Is there a DJ app for the Ipad that will read the "start" and "stop time" setting for each individual song, as they are set in the song Options screen in Itunes? The Ipod Touch, by itself does not allow cross-fading, therefore when the stop time is edited short, the song jusst truncates then goes to the next song. I tried the DJay ap and while it would crossfade, it would NOT read the song settings for the stop marker. So now I want to try and Ipad and see if there is an app that will READ the Itune stop settings within the song. I do NOT want an app that will allow me to DO the stop marker. I want an app that will READ the stop marker from the song as it is set in Itunes.

    Itunes provides the option for setting the Start and Stop times of each music track.  However, the start and stop times do not synchronize to the iPhone.  I don't understand why this option is even available as it doesn't work when listening to music on the phone.  I have not found another application that will support the start and stop time markets.  I have searched quite a bit for this but can't find anything.  I hope we can find something. 

  • How can I creat a control button that will allow the vi to run?

    Instead of pressing the run button, I want to creat my own run button that will allow my vi to run.
    Any idea?
    Thank you

    First you need to set the VI to Run When Opened (VI Properties>Execution). Then you create a front panel Boolean. On the diagram what you need to do is have some sort of idle state where nothing is done until the Boolean is pressed. It could be a separate while loop that doesn't exit until the Boolean is pressed, an Event Structure, or as part of a state machine. Look at the shippings examples Queued Message Handler, New Event Handler, Using Buttons for Options to name just a few.

  • As a graphic designer, I am creating ePubs that will be seen on iPads running, ios5, ios6 and ios7.  Each version displays the page differently.  Is there a way to make the display consistent on all systems?

    As a graphic designer, I am creating ePubs that will be seen on iPads running, ios5, ios6 and ios7.  Each version displays the page differently.  Is there a way to make the display consistent on all systems?

    As a graphic designer, I am creating ePubs that will be seen on iPads running, ios5, ios6 and ios7.  Each version displays the page differently.  Is there a way to make the display consistent on all systems?

  • What is the oldest generation of iPad that will still allow me to run IOS8 and allow for future IOS updates?

    Buying a used iPad... what is the oldest generation of iPad that will still allow me to run IOS8 and allow for future IOS updates?
    Thanks

    An iPad 2 will do it...for awhile. Realize that it's seemingly on it's last legs as far as iOS updates go and performance will not be great enough for today's demanding games. Also realize that a big part of running apps smoothly is how much system RAM (the memory area that the apps actually run in) the device has. The iPad 2 has 512 MB which is adequate for most apps but not for some. The iPads above the iPad 2 all have 1 GB of system RAM and the iPad Air 2 has 2 GB.
    The time will come when the iPad 2 can no longer be updated past a certain iOS version (as the iPad 1 is) so it will be more difficult to keep up with apps that you want to be using. This will eventually happen to ALL devices so you'll have to judge if you want to be at the tail-end of iOS updates or at least have a bigger buffer with a newer iPad.

  • I am looking for an ipad app that will restrict game play during certain times, but will allow education and reading apps.  Is there such an app?

    I am looking for an ipad app that will restrict game play during certain times, but will allow education and reading apps.  Is there such an app?
    I want my kids to be able to take their ipads to school - restricting game play. 

    Not aware of such an app. Here's some generalparental controls info.
    How Do I Block Websites on My iPad?
    http://www.ehow.com/how_8716944_do-block-websites-ipad.html#ixzz2lh8910jd
    How To Set Parental Controls and Block Content on the iPhone, iPad, and iPod touch
    http://blog.laptopmag.com/how-to-set-parental-controls-and-block-content-on-the- iphone-ipad-and-ipod-touch
    How to block specific websites from being accessed with Safari for iPhone and iPad
    http://www.imore.com/how-block-specific-websites-being-accessed-safari-iphone-an d-ipad
    How To Setup Parental Controls On The iPad
    http://content.mobicip.com/content/how-setup-parental-controls-ipad
    ParentKit
    https://itunes.apple.com/us/app/parentkit/id600618138?ls=1&mt=8
    Parental TimeLock - Time limit for children
    https://itunes.apple.com/us/app/parental-timelock-time-limit/id689577280?ls=1&am p;mt
     Cheers, Tom

  • I need to knew were can i put a code that will run after any step.

    i want that a specific code that i wrote will run after any step in the main sequence.
    this code suppose to increment a variable if the step is failed.
    i did not find the place in the VB Operator Interface that executed after each step.
    please tell me where i need to put my code so it will be excuted after any step regardless if the tracing is enabled or disabled.
    this question is about the original source code of TS VB Operator Interface.
    advaced thank's.
    avi gafa, RADA,Israel.

    Avi,
    There is an NI KB article on this titled "How Can I Perform Some Action
    After Every Step Executes" at:
    http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&06109F4BC56EAC03
    86256838005EB865&cat=629CD2F2758A8D00862567C2005ACE42
    HTH,
    Bob Rafuse
    Etec Inc.
    "avi gafa" wrote in message
    news:[email protected]..
    > i want that a specific code that i wrote will run after any step in
    > the main sequence.
    > this code suppose to increment a variable if the step is failed.
    > i did not find the place in the VB Operator Interface that executed
    > after each step.
    >
    > please tell me where i need to put my code so it will be excuted after
    > any step regardless if the tracing is enabled or disabled.
    >
    > this question is about the o
    riginal source code of TS VB Operator
    > Interface.
    >
    > advaced thank's.
    >
    > avi gafa, RADA,Israel.

  • Need help converting this html code into code that will work as a flash button

    I have some html code that is for a button in html that when
    pressed sends you to a certain url but also somehow adds an 'id
    value' and a 'website value'.
    How can I convert this code and or put it into a flash
    button?
    Disregard the gif info...that's just for the html graphic
    that goes for the button.
    [HTML]<form
    action="https://secure.verotel.com/cgi-bin/vtjp.pl"
    method="post">
    <input type=hidden name=verotel_id
    value="9804000000840231">
    <input type=hidden name=verotel_website value="55461">
    <center>
    <input type="image" src="
    http://buttons.verotel.com/join/button_00010155461.gif"
    alt="Signup NOW!">
    <img src="
    http://buttons.verotel.com/signup/tbutton_55461.gif"
    border="0" width="1" height="1" alt="">
    </center>
    </form>[/HTML]

    What you want to do might look something like this:

Maybe you are looking for