How to check if an incident happened during a time frame in C#?

I am developing software that adds if a button is clicked 5 times, a variable is incremented by '1'
IF A then B++
everything is good, but now I want the system to reset its counter if that 5 times did not happen within 10 seconds. I.e the speed of clicking matters.
If I click too slow, the increment should not happen even though I clicked 5 times as it exceeds that 10 secs period.
Any suggestion?

Just store the timestamps when the clicks happend.
A clean approach would be a ring buffer storing these values, with an in time window count property.

Similar Messages

  • How to Schedule Jobs to only run during a time window

    I have a long running task that needs to schedule jobs to process data.
    I only want these scheduled jobs to start during a specific window of time each day, probably 10:00 PM to 6:00 AM.
    If the scheduled jobs do not begin during the specified time frame, they must wait until the next day to start running.
    Each scheduled job will only be executed once and then auto dropped.
    How should I go about creating these scheduled jobs?

    Hi Jeff,
    I agree that the documentation isn't clear enough about the purpose of windows.
    You can indeed use windows for changing the resource plan, but you can also use them for scheduling your jobs.
    I did a simple test in real-time to illustrate the latter.
    At around 10.30 am today I created a table that will populated by a job:
    CREATE TABLE TEST_WINDOW_TABLE(EVENT_DATE DATE);
    Then, I created a window whose start_date is today at 10.40 am :
    dbms_scheduler.create_window(
                                 window_name     =>'TEST_WINDOW',
                                 resource_plan   => NULL,
                                 start_date      => to_date('10/04/2014 10:40:00', 'dd/mm/yyyy hh24:mi:ss'),
                                 repeat_interval => NULL,
                                 duration        =>interval '5' minute
    You can see that this window doesn't have a resource plan, and its repeat interval is NULL (so it will be opened only once).
    The window will stay open for 5 minutes.
    Finally, I created a one-off job whose schedule is the previously created window:
    DBMS_SCHEDULER.create_job (
                               job_name      => 'TEST_WINDOW_JOB',
                               job_type      => 'PLSQL_BLOCK',
                               job_action    => 'BEGIN insert into test_window_table values (sysdate); COMMIT; END;',
                               schedule_name => 'SYS.TEST_WINDOW',
                               enabled       => true,
                               auto_drop     => true
    Checking the user_scheduler_job_log before 10.40 would return no rows, which mean the job hasn't started yet since the window was not open.
    Now, from 10.40, it shows one entry:
    SQL> select log_date, status from user_scheduler_job_log where job_name = 'TEST_WINDOW_JOB';
    LOG_DATE                                                                         STATUS
    10/04/14 10:40:02,106000 +02:00                                                  SUCCEEDED
    The TEST_WINDOW_TABLE has also got the row:
    SQL> select * from TEST_WINDOW_TABLE;
    EVENT_DATE
    10/04/2014 10:40:02
    Voilà.
    In your case, since you want to run the jobs daily between 10 pm and 6 am (duration of 8 hours), the window would look like this:
    dbms_scheduler.create_window(
                                 window_name     =>'YOUR_WINDOW',
                                 resource_plan   => NULL,
                                 repeat_interval => 'freq=daily;byhour=22;byminute=0;bysecond=0',
                                 duration        =>interval '8' hour
    For your jobs, you may need to specify an end_date if you want to make sure the job gets dropped if it couldn't run in its window.

  • How to check bind peeking is happening for a sql

    Hi Team,
    11.2.0.3.5, RHEL-6 on 64 bit, 2 node RAC.
    We have been continuously facing performance issues after upgraded to 11g. sqls were fine when we are in 10g and they started following un-optimized plans. I heard that 'automatic cursor sharing' is enabled by  default in 11gr2. But how do we verify, whether a sql id peeking at its binds ? Can somebody share the query if you have ?
    And also, any useful links regarding this pls suggest me.
    Thanks,
    Hari

    Hi,
    you can check this  may it help you :ORACLE-BASE - Adaptive Cursor Sharing in Oracle Database 11g Release 1

  • How to check valuation type and batch during creating PO

    Hi All,
    can every body help me please,
    I have a material which manage by batch and valuation type.
    When user create purchase order using that kind of material I want the system checking field batch and valuation type. If they not match then system will give an error message.
    What should I do to make the system checking that fields?
    Thxs
    - ely -

    Hi Ely
    Fortunately, you do not need to do any coding or need to use exits.
    You can configure the screen layout settings as follows:
    1) SPRO->MM->Purchasing->Purchase Order-> Define screen layout at doc level
    2) Double click on the key-NBF (most probably you are using this for your PO document type. If you are using any other field layout key..make changes there)
    3) Double click on GR/IR control .
    4) Make Valuation Type & Batch fields 'Required'.
    System works intelligently here. If the material is batch managed, system expects you to enter a batch in PO. If the material has split valuation, then system also expects you to enter valuation type. FOr other materials, system does not expect you to enter batch or valuation type.
    Best regards
    Ramki

  • How to setup process chains to run during office times every 30 minutes

    I want to set up a process chain to run only during 8 am to 6 pm MST every 30 minutes. How do I do such a setting in the process chain?
    Regards
    Ram

    Hello,
    You can do this by creating a daemon chain which runs once every 30 mins and triggers a event.
    You can use the event triggered by the daemon chain in the start variant of the PC which you require to run every 30 mins.
    But before doing that, make sure that one run of your process chain completes definetly in 30 mins.
    Let me know if you are looking for additional information.
    Cheers,
    MS.

  • How to update and save values changes during run time

    I have string and numeric controls on my front panel that the operator can change the values of and was wondering if there was any way to save these changes everytime the vi was closed so they would stay current???
    thanks
    dale walker
    [email protected]

    If you want to change the default settings, its a little involved, mainly because your editing a control's settings while in 'run' mode, but study the example in the below link to get you going.
    Another method is to write your values in a text file. This could be part of your closing routine before actually stopping the VI's run. Then, upon the next running of the VI, your initiating routine would involve reading the text file to populate your controls/indicators. I often use these text files because users can easily view them with Wordpad, etc., as needed, without needing labview on their PC.
    Good luck with it, Doug
    http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&2C14132F826F839F8625683A000B0B99&cat=DB5863CD70417B07862567930070A058

  • My iPad Mini iOS7 is showing only Apple Logo which happened during software update. I tried to restore using iTunes but it asking me to response from iPad. But my ipad only shows apple logo. How can i response? How to solve this problem?

    My iPad Mini iOS7 is showing only Apple Logo which happened during software update. I tried to restore using iTunes but it asking me to response from iPad. But my ipad only shows apple logo. How can i response? How to solve this problem?

    FORCE IPAD INTO RECOVERY MODE
    1. Turn off iPad
    2. Turn on computer and launch iTunes (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port.
    DO NOT RELEASE BUTTON until you see picture of iTunes and plug
    5. Release Home button.
    ON COMPUTER
    6. iTunes has detected iPad in recovery mode. You must restore this iPad before it can be used with iTunes.
    7. Select "Restore iPad"...
    Note:
    1. Data will be lost if you do not have backup
    2. You must follow step 1 to step 4 VERY CLOSELY.
    3. Repeat the process if necessary.

  • How to check Reconcilliation has happened or not for a payment document

    Hi,
    How to check Reconcilliation has happened or not for a payment document? Payment doc ABCDEF was created on 2nd. Now i am not sure whethr RECON has happend ot not
    Please help.

    Dear,
    If you have made payment to vendor and want to know whether reconciliation happened or not then check if this document exist in table BSIK then reconciliation has not been done.
    Regards,
    Chintan Joshi.

  • What happens during an iphone 5 processing order, i ordred mine 1 week ago and when i check the status it says processing order

    What happens during an iphone 5 processing order, i ordred mine 1 week ago and when i check the status it says processing order

    Does your Cloud subscription show on your account page?
    https://www.adobe.com/account.html for subscriptions on your Adobe page
    This is an open forum, not Adobe support... you need Adobe staff to help
    Adobe contact information - http://helpx.adobe.com/contact.html
    -Select your product and what you need help with
    -Click on the blue box "Still need help? Contact us"
    -or by telephone http://helpx.adobe.com/x-productkb/global/phone-support-orders.html

  • How to check during logon if an SAP ECC6.0 (ABAP) user is in Microsoft ADS

    Hello
    How to check during logon if an SAP ECC6.0 (ABAP) user is in Microsoft Active Directory Services.
    I would like to prevent logon to ABAP system for users not present in Microsoft Active Directory Services
    Thank you in advance

    Have you looked at setting the SNC functionality for lookups against AD? Here's a link that might be helpful: [Secure Network Communications |http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e6/56f466e99a11d1a5b00000e835363f/frameset.htm]
    [Configuring SNC on AS ABAP  |http://help.sap.com/saphelp_nw70ehp1/helpdata/en/e6/56f466e99a11d1a5b00000e835363f/frameset.htm]
    Hope that is helpful.
    J. Haynes

  • How can changes happened during the cube activation  be nullified.

    Hi all,
    I was trying to activate some business content infocube in the dev.server. I selectecd data flow before. In the process I collected all infoobjects associated with the cube and all the info-objects which are associated with that info-objects. When I installed the cube some of the customised business content info-objects associated with the cube got over written by the delivered version. We dont have the documentation which provides the information on which are all the infoobjects that were modified and which were not.
    Can any one give some idea how the changes happened during the cube activation can be nullified.Or how can I find out which were the info objects which were customised before business content was again activated and which are those changes.
    Regards,
    Anand

    Hi Anand,
    As long as you did not activate the Cube (= not activate BC, but cube itself)
    you can compare the changed cube with the active cube (Change cube screen, use button Version Comparison)
    Udo

  • What happens during sql startup ?

    Hi All,
    What happens during SQL Server service startup ?
    Basically, i am looking at step by step process of how sql server brings up the instance with all sp_configure settings,startup parameters etc..
    Thanks in Advance.

    You don’t have to restart SQL Server unless you have changed service properties or already set startup traces and you want that to take effect immediately. Restarting the server
    is probably one of the most damaging things for performance as it throw away statistics collected in the operational stats DMVs (i.e. SQL Server resets the counters to 0 each time
    the SQL Server service is restarted) and so on.
    Anyways to answer the question always when you start up SQL Server it goes via different recovery phases so for detail reading check out this link, I hope this
    might help you in finding out your answer 
    https://community.emc.com/docs/DOC-13849
    Please remember to click “Mark as Answer” on the post that has answered your question as it it very relevant to other community members having the same problem.

  • Cube hang up is happening during Dimension Build process

    We are using the Excel VBA tool for the Dimension build process.The tool will build the members in 3 applications(Atlaunch,ModeLife,Textcube).Most of the times cube hung up is happening at the Text cube. The dimension build process is described below
    Dimension Build Process :-
    The dimension build process is performed by the Calculation and Dimension Build Tool.
    Before executing dimension build logging in to essbase server is required through the tool
    Once logged in the particular region where dimension build is supposed to be carried out is selected from NML, NA, NE and NS.
    Per region there are 3 applications namely <Region>LNCH, <Region>LIFE and <Region>TEXT and per application there is only 1 database namely AtLaunch, ModeLife and TextData respectively. The cube structure per region is given below:
    NML Region:
    NMLLNCH.AtLaunch
    NMLLIFE.ModeLife
    NMLTEXT.TextData
    NA Region:
    NALNCH.AtLaunch
    NALIFE.ModeLife
    NATEXT.TextData
    NE Region:
    NELNCH.AtLaunch
    NELIFE.ModeLife
    NETEXT.TextData
    NS Region:
    NSLNCH.AtLaunch
    NSLIFE.ModeLife
    NSTEXT.TextData
    The Dimension Build Process is carried out in 2 steps:
    1.     Project Master Code Build –
    2.     Grades, Line Options, Project Description and Reference Currency Build –
    Project Master Code Build:-
    In the Project Master Code Build by the Calculation and Dimension Build Tool the following processes are involved
    •     Some members are dynamically created in <Region>LNCH.AtLaunch, <Region>LIFE. ModeLife and <Region>TEXT. TextData cubes.
    •     Some data is loaded in <Region>LNCH.AtLaunch Cube.
    Grades, Line Option, Project Description and Reference Currency Build:-
    Grades – Some members are dynamically created in <Region>LNCH.AtLaunch and <Region>LIFE. ModeLife cubes.
    Line Options - Some members are dynamically created in <Region>LNCH.AtLaunch
    Project Description - Some members are dynamically created in <Region>TEXT.TextData cube. After that some data is loaded in <Region>TEXT.TextData cube.
    Reference Currency – UDA is updated in <Region>LNCH.AtLaunch, <Region>LIFE.ModeLife cube and UDA and Alias is updated in <Region>TEXT.TextData cube.
    Note: Most of the times during Project Description Build we are experiencing cube hang up / no response for NMLTEXT.TextData, NATEXT.TextData, NETEXT.TextData and NSTEXT.TextData cubes.
    Text cube dimension build process flow :-
    1. Introduction
    The Dimension Build process in CDB system is used for adding new project information in the cubes (AtLaunch, ModelLife and TextData). The text files which are needed for performing dimension build are generated from the child packages and stored in the local system of the user (<LocalDrive>:\GCEP4\Input\CDB_DimensionBuild). The Dimension Build process is carried out in 2 stages:
    1.     Project Master Code Build
    2.     Grades, Line Option, Project Description and Reference Currency Build
    Project Master Code Build:-
    In the Project Master Code Build by the Calculation and Dimension Build Tool the following processes are involved
    •     MsPr_DIM rule is used for the text file F0P_<Project>-<Milestone>-<Version>.txt to build Project Master Code in AtLaunch, Model Life and Text Data Cubes.
    •     MsPr_FLG rule is used to Load some data from the text file F0P_<Project>-<Milestone>-<Version>.txt in AtLaunch Cube.
    Grades, Line Option, Project Description and Reference Currency Build:-
    Dimension Build w.r.t. Grades and Line Options are carried out in AtLaunch and Model Life cubes which is not in scope of this document. Dimension Build w.r.t. Project Description and Reference Currency change are carried out in Text Data cube, so only those parts are discussed in this document.
    2. Project Description Build (Detailed process flow)
    The Project Description Build is carried out in the following steps:
    •     First, any Lock on the particular PMV is checked. If not locked next operation is carried out.
    •     Database availability is checked next (whether any other Dimension build is happening that time or not) and accordingly the availability flag is updated in TextData cube.
    •     Next cache is set from high to low to carry out dimension build.
    •     After cache setting, one rule file at a time is taken (as given in the cfgDL sheet) and dimension build is performed by using the Rule file and text file (created in local by input packages) on the intended cube.
    •     For a particular Rule file “GCM_FDIM” which is used to build CCM information in TextData cube, the following steps are followed by the tool itself:
    o     From the TextData cube all the child members under CCM member under Grades dimension are fetched by “GetMbrInfo” function (GetMbrInfo is used around 2000 to 3000 times).
    o     The child members under CCM for that particular PMV combination are deleted (if previously build).
    •     New child members under CCM are build based on the information provided in the text file F1G_<Project>-<Milestone>-<Version>.txt
    •     Once CCM is build rest of the rule files are used to carry the dimension build operation.
    •     The Dimension build process is carried out by building dimensions as well as updating some flags (loading data).
    •     Reference Currency is updated (if required) at last.
    Why this cube hang up is happening?
    Thanks in advance

    53 questions, all still open. Would you mind marking them as closed as without at least the "question is closed" tag, there's no way for future readers to know if your issues have been resolved or not. I know that I personally use this board for answers quite often and it really helps me when I see that a question has been adequately answered. Points assigned to those who helped you is a nice touch.
    Now to your question: did you by any chance change from one Essbase server to another? You didn't state if this build issue happens all the time, or only if you do all three databases, or much of anything in your post as to the actual process of failure, so I'm kind of guessing wildly on this. If true, you might want to look at: http://timtows-hyperion-blog.blogspot.com/2007/12/essbase-api-error-fix-geeky.html
    Regards,
    Cameron Lackpour
    P.S. MMIC, GlennS, and I were just discussing your kind of build-hierarchy-in-Excel approach last week and how infrequently it's seen nowadays. Not a criticism, I personally like these old-school approaches, probably because I've built one or two myself.

  • How can I stop music from skipping during play

    I do not like iCloud.  How can I convert back to the previous version?  If not available, then how can I stop songs from skipping during play?  (Only started happening when iCloud installed).

    Hi,
    Exits for T/C PA40 area:
    Exit Name           Description
    HRPC0001            HR: PC download authorization
    HRRPAI01            User exit for FB HR_ENTRY_DATE and HR_LEAVING_DATE
    PARA0001            Enhancement for Determining the Number of Periods
    PARA0002            Enhancement for Calculating Annual Salary; IT0008,14,15
    PBAS0001            PA: Pers.Admin./Recruitment: Default values and checks
    PBAS0002            PA: Enhancements for Personnel Administration - Menu
    PBASRP01            PA: User exit distributed reporting
    HRPBAS01            User exit for personnel number validation
    I think exit PARA0002 will work for this requirement.
    for confirmation put BREAK-POINT in the include and do the action with PA40 t/c, if cudrsor goes to the BREAK-POINT stmt, the logic to write si
    if screen-name eq 'aaaa'. (for exact names can go for f1 help>tech attribts>)
    if filed-name eq (for example:) anzhl
    if anzhl is initial..(u can go for writing all the fields with AND operator)
    message: e
    endif.
    endif.
    endif.
    I hope just idea will help you.
    Regards,
    Thrilleswar

  • How to check vendor payment

    Hi gurus,
    how to check vendor payment is done are not in purchase order
    Regards
    murali

    Check through FBL1N vendor line item display, here you can check for the vendor libality generated during invoice (MIRO) posting once you get into the t-code FBL1N select the radio button open items only in line item selection give your vendor account, company code date (Key day at which the line items are open till now), and execute.
    In the report screen to help your self you can search using crtl + F and put reference as serach criteria.
    You will see the non cleared item the Status indicator tells you the line item is not yet cleared.
    BR

Maybe you are looking for

  • What are the key points to beconsider while upgrading from 4.7 to ECC 6.0

    hai What are the key points to beconsider while upgrading from 4.7 to ECC 6.0 please provide sufficient material points will be rewarded regards v.sridhar

  • Open a finder window with NSMenuItem button

    Hi there fellow Developers, In my application I'm trying to open a finder window from inside my app through a NSMenuItem button. The finder window cannot be blank or the standard one that is opened once you click on the finder icon. It must be the on

  • How to activate new pricing procedure for old Pur Document

    Dear all, we have added some condition type  in our pricing procedure,every thing is ok but my question is this new condition added in pricing procedure are not reflecting in previously created purchasing document/po, how can we do it I kw that if we

  • Ageing reports

    Hi Can you please advise of a report that can be used to age AP further back than 3 years. On the ZAPDUE1 accounts aging fields are only 3 digits wide, so  I canu2019t enter any days > 999 days. Is there maybe a report that ages AP by months/years? T

  • Qualifiers for IDOC_INPUT_ORDRSP

    Hi, where will we  see all values of qualifier for IDOC_INPUT_ORDRSP