Announcement

Collapse
No announcement yet.

efs study update frequency

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • efs study update frequency

    Hi,
    I am aware of setcomputeonclose(), but is it possible to set a specific update frequency for an efs study - eg: study updates every 15 seconds?

    Paul

  • #2
    Re: efs study update frequency

    Originally posted by TURLIES
    Hi,
    I am aware of setcomputeonclose(), but is it possible to set a specific update frequency for an efs study - eg: study updates every 15 seconds?

    Paul
    You might try using getDate() function which returns a single value for the current date. When you subtract two dates the difference is in milliseconds. I have not run this code so it probably contains mistakes. The idea is to retrieve the date wait until the number of millisecons has increased by 15000 (15 seconds) and then do some more processing and do it all over again.

    If this doesn't work perhaps you can follow my logic and fix it...

    var bGotIt = false;

    if (bGotIt == false) var vTimeA = new Date();
    //remember the time at the start of processing, recognizing that the date is know to the millisecond

    if ((bGotIt == false) {
    run your code here;
    return (your values);
    bGotIt = true;
    }

    //okay we have the data and we will wait until the else statement says 15 seconds has elapsed

    else {
    var vTimeB = new Date(); //compare time now with the beginning of processing
    if (vTimeB - vTimeA = >15000) bGotIt = false; //15 seconds has expired
    }
    return;
    ....Mike

    Comment


    • #3
      Thanks Mike

      Paul

      Comment

      Working...
      X