5 Replies Latest reply on Dec 19, 2006 2:32 AM by Newsgroup_User

    Chrono

    ced--ced
      Hi,
      I've done this chrono but it seems that it's not very acurate. Any tip how I could improve it?

      Thanks

      It starts like this:

      var intervalId:Number;
      var count:Number = 0;
      var duration:Number = 10;
      function executeCallback():Void {
      count++;
      }
      intervalId = setInterval(this, "executeCallback", duration);


      Then I stop it with this:

      clearInterval(intervalId);

      And this is to show the result:

      txtElapsedTime.text = (count/100)+"sec.";