code: function updateMeasurement(id) {
          var elapsedTime = brackets.app.getElapsedMilliseconds();
  
          if (updatableTests[id.id]) {
              // update existing measurement
              elapsedTime -= updatableTests[id].startTime;
  
              // update
              if (perfData[id] && Array.isArray(perfData[id])) {
                  // We have existing data and it's an array, so update the last entry
                  perfData[id][perfData[id].length - 1] = elapsedTime;
              } else {
                  // No current data or a single entry, so set/update it
                  perfData[id] = elapsedTime;
              }
  
          } else {
              // not yet in updatable list
  
              if (activeTests[id.id]) {
                  // save startTime in updatable list before addMeasurement() deletes it
                  updatableTests[id.id] = { startTime: activeTests[id.id].startTime };
              }
  
              // let addMeasurement() handle the initial case
              addMeasurement(id);
          }
      }
docs: This function is similar to addMeasurement(), but it allows timing the
  *last* event, when you don't know which event will be the last one.
  
  Tests that are in the activeTests list, have not yet been added, so add
  measurements to the performance data, and move test to updatableTests list.
  A test is moved to the updatable list so that it no longer passes isActive().
  
  Tests that are already in the updatableTests list are updated.
  
  Caller must explicitly remove test from the updatableTests list using
  finalizeMeasurement().
  
  If markStart() was not called for the specified timer, there is no way to
  determine if this is the first or subsequent call, so the measurement is
  not updatable, and it is handled in addMeasurement().
  
  @param {Object} id  Timer id.