How can I do certain things once per second?

I need to perform things that would take more than 1 second.
And they need to be repeated each second.
How can I make them happen in a precise time schedule?
Solved!
Go to Solution.

A timed loop is one option, but on Windows not the best. Well, to be precise: Windows itself is no good choice if you require determinism.
I would rather go for a normal while loop with a "Wait Until Next Multiple (ms)" wait function configured for 1000 ms. Depending on the code in the loop, you would probable "miss" iterations though....(which is also true for timed loops)
Norbert 
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.

Similar Messages

  • How can I execute certain code once the button on stake is hit at runtime? (in Flash CS4(AS3))

    Hi
    I am trying to figure out how to execute code once a button_btn is hit on stage at runtime.
    Thank you for help and tips!

    You can also try to create an event listener for the button itself.  (In as2.0 it was onClick or onPress or something to that effect, now I'm not sure what they are syntaxed as but there are event listeners for buttons which "listen" to see if the button has been pressed.  Mouse Events are good because it makes sure that the mouse is actually performing the action.  Don't know about accessibility with Mouse Events though since you can use a Tab key to direct input of buttons so try the Button event listeners.

  • How can I have header only once in group above rep

    Hi
    I have developed a group above report and i see that the main header is repeated for every row (that is group by row). How can I have that only once per page or report and not repeat for every record?

    The "main header" must be inside the repeating frame. Put the repeating frame in its own non-repeating frame, put the header in its own frame inside this frame at the top.
    It sounds like you are using the report wizard... if so, don't.

  • How to find out who your administrator is and why I can't view certain things even on this web sight business account is what I have

    How do I find out who my administrator is and why I can't view certain things and get error 401 says i am an unauthorized user
    It is a small business which doesn't make sense why I shouldn't be able to access certain pages  on the Internet
    I believe my husband is the administrator actually
    Plus 404 and 403

    If you are referencing a specific web site, there is no way to determine who is set up as administrator. Contact the web site directly.
    Barry
    P.S. As a note, you already received an answer to your "401" question. Please do not rephrase a question and post it again. We are volunteers here and do not like to answer something that has already been addressed.
    Message was edited by: Barry Hemphill

  • How can I extract certain pages from my document and save as another file?

    How can I extract certain pages from my document and save as another file?

    You would need Adobe Acrobat to do that, not Adobe Reader.

  • How can I restrict certain apps to cellular data only?

    Product Name: iPhone 6
    Product iOS: 8.3
    Background: I listen to Pandora at work through my iPhone 6. My work has pandora traffic blocked through their WiFi network. I want to keep my iPhone connected to the work WiFi because 1) I don't want to turn on and off my WiFi on my phone 2) I want to my email and other apps to use WiFi since they are not blocked.
    Current Workarounds (not a solutions):
    1) Turn off and on WiFi on iPhone 6- This is a pain/hassle and I forget to turn the WiFi back on.
    2) Switching to a different streaming music providers that aren't blocked by work WiFi- I pay for Pandora One and I like this service the best. I really don't want to switch.
    3) Download music to iPhone memory- I pay for Pandora One and I'd like to use it.
    4) Jailbreak- Not sure if this a solution but I'd rather not jailbreak my device.
    Question: How can I restrict certain apps (Pandora) to use cellular data only?
    Best Regards,
    Chasen

    The network settings in iOS are global and do not support assigning specific networks to specific apps. You cannot do what you describe.

  • In Lion, running on an i MAC (late 2006), how can I stop certain programs from automatically starting up when I start my MAC?

    In Lion, running on an I MAC, (late 2006), how can I stop certain programs (iTunes, Word) from automatically starting up when I start the computer?

    Any application that is open when you shut down will re-open when you restart unless you deselect this when shutting down/restarting:
    Also check System Preferences>Users & Groups>Login items tab and make sure there's nothing listed there that you don't want launched.

  • How can I be certain the contact list in my iPod touch updates my computer Outlook contact list when I sync and not go the other way? The options in iTunes are not specific enough.

    How can I be certain the contact list in my iPod touch updates my computer Outlook contact list when I sync and not go the other way? The options in iTunes are not specific enough. In other words, I want to replace the information in my computer Outlook contact list with the data from my iPod touch. 

    How is your iPod configured to sync music from your iTunes library?  In other words, what options and configurations do you have enabled from under the iPod's Summary and Music configuration panes in iTunes?
    B-rock

  • How can I have one thing open in Safari on my MacBook Pro and search for another thing in Safari without closing out of the other? For instance, How can I leave Pandora playing while I search Facebook?

    How can I have one thing open in Safari on my MacBook Pro and search for another thing in Safari without closing out of the other? For instance, How can I leave Pandora playing while I search Facebook?

    With Safari open use the Command + T keyboard shortcut to open a new tab.
    Or, Command + N to open a new window.

  • How can I get this thing to work without apple id? :(

    I've got Iphone 4s from my boss instead of my paycheck due to a bankrot. And he doesn't remember his apple id,password or e mail he used to activate Iphone.. How can I get this thing to work without it? :/

    You can't.
    Sounds like it he gave you a stolen iPhone or at least a worthless one.

  • How can I unverify an email once it is not being used?

    I changed my iTunes account email once. Now, I need to get back to that email, but Apple says it is being used in another account. I am pretty sure that the first email is not being used for any other account.
    Through Apple's site, I chose "iForgot" to resend the password , so I should be able to login to that email account (if it was linked to another account, like they claim). Apple can't send an email for verification. Actually, they say that the email was sent, but it was not.
    How can I unverify this email once Apple says it is linked to another account, but it is not (if it was, the iForgot email would come)?

    for either method to work the state dividing lines must go past the state borders, for example, the line that divides these two states needs to go north a little bit more, I exaggerated the space so you can see, for your map this gap must be really small. Zoom in where you have trouble making separate shapes and fix it before using either tool.

  • After I have converted PDF file to Word how can I select certain pages to save them as a new document? Thank you

    After I have converted PDF file to Word how can I select certain pages to save them as a new document? Thank you

    You've said you have a Word file and want to use some pages in the file to create a new document.
    Use Word to establish a new Word file that has the desired pages for the original Word file.
    You now have a "new document" of the desired pages.
    With Acrobat Standard or Pro installed you can create a "new document" PDF.
    If you do not have Acrobat Standard or Pro or a subscription to an online Adobe service that can create PDF from MS Word you can use the Microsoft process to create PDF that comes with MS Word.
    Be well...

  • How can I sum all the amount per line?

    HI,
    How can I sum all the amount per line?
    EXAMPLE:
    [code]
                                             TOTAL:
    1,000         2,000     5,200            $8,200
      400         1,200     6,000             7,600
    [/code]
    THANKS!!

    If you are sure of the number of columns that you are gonna get then you can add them to a variable and display.
    total = itab-col1 + itab-col2 + itab-col3.
    If you dunno how many columns will come , you have to use field symbols.
    Say the datatabse table has 16 columns which will contain your price and you have to calculate the sum of all those , then assign them to field symbols and calculate.
    Have a look at the following code.
    FORM GET_VALUES_FROM_COSS .
      FIELD-SYMBOLS: <FS1> TYPE ANY.
      DATA: V_COMPONENT1 TYPE I.
      V_COMPONENT1=31.  " your field of table from which amount field starts
    Cumulate the posting values of all the 16 period buckets as to get
    total production order cost. This is to handle the partial posting of
    production order values in different periods.
      DO 16 TIMES.
        ADD 1 TO: V_COMPONENT1.
        ASSIGN COMPONENT V_COMPONENT1 OF STRUCTURE COSS TO <FS1>.
        IF COSS-WRTTP EQ '05' AND COSS-KSTAR EQ C_KSTAR1.
          ADD <FS1> TO I_FINAL-PL_LABCOST.
        ELSEIF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ C_KSTAR1.
          ADD <FS1> TO I_FINAL-ACT_LABCOST.
        ELSEIF COSS-WRTTP EQ '05' AND COSS-KSTAR EQ C_KSTAR2.
          ADD <FS1> TO I_FINAL-PL_MATCOST.
        ELSEIF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ C_KSTAR2.
          ADD <FS1> TO I_FINAL-ACT_MATCOST.
        ELSEIF COSS-WRTTP EQ '05' AND COSS-KSTAR EQ C_KSTAR3.
          ADD <FS1> TO I_FINAL-PL_OPCOST.
        ELSEIF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ C_KSTAR3.
          ADD <FS1> TO I_FINAL-ACT_OPCOST.
        ELSEIF COSS-WRTTP EQ '05' AND COSS-KSTAR EQ C_KSTAR4.
          ADD <FS1> TO I_FINAL-PL_FACCOST.
        ELSEIF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ C_KSTAR4.
          ADD <FS1> TO I_FINAL-ACT_FACCOST.
        ELSEIF COSS-WRTTP EQ '05' AND COSS-KSTAR EQ C_KSTAR5.
          ADD <FS1> TO I_FINAL-PL_LABCOST.
        ELSEIF COSS-WRTTP EQ '04' AND COSS-KSTAR EQ C_KSTAR5.
          ADD <FS1> TO I_FINAL-ACT_LABCOST.
        ELSEIF COSS-WRTTP EQ '05'.
          ADD <FS1> TO I_FINAL-OTHER_PL_COST.
        ELSEIF COSS-WRTTP EQ '04'.
          ADD <FS1> TO I_FINAL-OTHER_ACT_COST.
        ENDIF.
      ENDDO.
    ENDFORM.                    " GET_VALUES_FROM_COSS
    Let us know if u need more inputs

  • HT1918 i want to change the country from USA to EGYPT in the itunes but i get a message saying, u have remaining balance which is 0.44 USD, how can i find some thing for 0.44 USD to spend this sum so i can switch my account to the right store??

    i want to change the country from USA to EGYPT in the itunes but i get a message saying, u have remaining balance which is 0.44 USD, how can i find some thing for 0.44 USD to spend this sum so i can switch my account to the right store??

    Buy something for more than the balance and charge the remainder to a credit card, or write Apple and ask them to keep the balance.
    iTunes Customer Service Contact - http://www.apple.com/support/itunes/contact.html > Get iTunes support via Express Lane > iTunes > iTunes Store

  • How can I stop certain applications from opening automatically on restart

    How can I stop certain applications from opening automatically on restart?  I don't know when or why this began to happen but it's driving me nuts!  Thanks in adavance for any help.

    Go to System Preferences -> Users and Groups -> Login Items and remove all apps from the list:

Maybe you are looking for