dojox/timing/_base.js

  • Provides:

    • dojox.timing._base
  • dojox.timing.Timer

    • type
      Function
    • parameters:
      • interval: (typeof int)
        Interval between function calls, in milliseconds.
    • source: [view]
       this.timer = null;
       this.isRunning = false;
       this.interval = interval;


       this.onStart = null;
       this.onStop = null;
    • summary
      Timer object executes an "onTick()" method repeatedly at a specified interval.
      repeatedly at a given interval.
  • dojox.timing.Timer.timer

    • summary
  • dojox.timing.Timer.isRunning

    • summary
  • dojox.timing.Timer.interval

    • type
      Interval
    • summary
      between function calls, in milliseconds.
  • dojox.timing.Timer.onStart

    • summary
  • dojox.timing.Timer.onStop

    • summary
  • dojox.timing.Timer.onTick

    • type
      Function
    • source: [view]
        // summary: Method called every time the interval passes. Override to do something useful.
    • summary
      Method called every time the interval passes.  Override to do something useful.
  • dojox.timing.Timer.setInterval

    • type
      Function
    • parameters:
      • interval: (typeof New)
        interval, in milliseconds.
    • source: [view]
        if (this.isRunning){
         window.clearInterval(this.timer);
        }
        this.interval = interval;
        if (this.isRunning){
         this.timer = window.setInterval(dojo.hitch(this, "onTick"), this.interval);
        }
    • summary
      Reset the interval of a timer, whether running or not.
  • dojox.timing.Timer.setInterval.interval

    • type
      New
    • summary
      interval, in milliseconds.
  • dojox.timing.Timer.start

    • type
      Function
    • source: [view]
        if (typeof this.onStart == "function"){
         this.onStart();
        }
        this.isRunning = true;
        this.timer = window.setInterval(dojo.hitch(this, "onTick"), this.interval);
    • summary
      Start the timer ticking.
    • description
      Calls the "onStart()" handler, if defined.
      Note that the onTick() function is not called right away,
      only after first interval passes.
  • dojox.timing.Timer.stop

    • type
      Function
    • source: [view]
        if (typeof this.onStop == "function"){
         this.onStop();
        }
        this.isRunning = false;
        window.clearInterval(this.timer);
    • summary
      Stop the timer.
    • description
      Calls the "onStop()" handler, if defined.
  • dojox.timing._base

    • type
      Object
    • summary
  • dojox.timing

    • type
      Object
    • summary
  • dojox

    • type
      Object
    • summary