Example #1
0
File: time.js Project: 4gh/gaia
function Time(app) {
  this.app = app;
  Responder.call(this);
  TimeObserver.call(this);

  this._timeCache = Object.create(null);

  /** cache of all loaded events */
  this._eventsCache = Object.create(null);

  this._timespans = [];
  this._collection = new IntervalTree();
  this._collection.createIndex('eventId');

  this.busytime = app.store('Busytime');
  this.calendarStore = app.store('Calendar');
}
Example #2
0
File: busytime.js Project: 4gh/gaia
  _setupCache: function() {
    // reset time observers
    TimeObserver.call(this);

    this._byEventId = Object.create(null);
  },