lib/eep.clock_counting.js
function CountingClock() {
  var self = this, at, mark = null;

  self.at = function() {
    return at;
  };

  self.init = function() {
    at = mark = 0;
    return at;
  };

  self.inc = function() {
    at += 1;
  };

  self.tick = function() {
    if (mark === null) {
      mark = at + 1;
    }

    return ((at - mark) >= 1);
  };

  self.tock = function(elapsed) {
    var d = at - elapsed;
    if ( d >= 1) {
      mark += 1;
      return true;
    }
    return false;
  };
}
function CountingClock() {
  var self = this, at, mark = null;

  self.at = function() {
    return at;
  };

  self.init = function() {
    at = mark = 0;
    return at;
  };

  self.inc = function() {
    at += 1;
  };

  self.tick = function() {
    if (mark === null) {
      mark = at + 1;
    }

    return ((at - mark) >= 1);
  };

  self.tock = function(elapsed) {
    var d = at - elapsed;
    if ( d >= 1) {
      mark += 1;
      return true;
    }
    return false;
  };
}
function CountingClock ( ) { var self = this , at , mark = null ; self . at = function ( ) { return at ; } ; self . init = function ( ) { at = mark = 0 ; return at ; } ; self . inc = function ( ) { at += 1 ; } ; self . tick = function ( ) { if ( mark === null ) { mark = at + 1 ; } return ( ( at - mark ) >= 1 ) ; } ; self . tock = function ( elapsed ) { var d = at - elapsed ; if ( d >= 1 ) { mark += 1 ; return true ; } return false ; } ; }
Simple monotonic clock. Ticks and tocks like the count on Sesame St. Mwa ha ha. Monotonic, basically.
Simple monotonic clock . Ticks and tocks like the count on Sesame St . Mwa ha ha . Monotonic basically .