Results 1 to 2 of 2

Thread: Antirepeat don't work correctly

  1. #1
    Join Date
    Jun 2003
    Location
    Belarus, Minsk
    Posts
    22

    Default Antirepeat don't work correctly

    Program:

    Command1 (TriggerEvent("Event2", 2)) executing on Event1 (Antirepeat 0)
    Command2 executing on Event2 (Antirepeat 1000)

    If send more one Event1 cotinuously during 900 msec then Command2 executing twice!!! Girder 3.2.9

  2. #2
    Join Date
    Feb 2001
    Location
    Plano, TX, USA
    Posts
    3,055

    Default

    I believe part of this is dependant on your machine speed, memory size and processor load. It also depends on the vagueness of the Windows scheduler. I set up the following experiment:

    Using 3 GVMS command arranged as follows -

    Command 1 - Setup/Start -
    Code:
    LastTime = TIME_GetTicks()
    j = 0
    i = 0
    TriggerEvent("TriggerStart",18)
    Command 2 - Event 1 - eventstring="TriggerStart",18
    Code:
    TriggerEvent("TriggeredByEvent1",18)
    delta = TIME_GetTicks(LastTime)
    i = i + 1
    if delta < 980 then
       TriggerEvent&#40;"TriggerStart",18&#41;
    end
    Command 3 - Event 2 - eventstring="TriggeredByEvent1",18 - antirepeat=1000
    Code:
    j = j + 1
    OtherDelta = TIME_GetTicks&#40;LastTime&#41;
    I get the results -
    • i=121
    • j=1
    • OtherDelta=0
    • delta=984

    It appears that if I send 121 events in 984ms, there is no anti-repeat problem.

    If I change "if delta < 990 then" to "if delta < 980 then", I send 122 events, OtherDelata=1000 and j=2.
    Mark F

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •