end method

void end()

Implementation

void end() {
  String p = path.join('.');
  path.removeLast();
  var start = starts.removeLast();
  int ms = (new DateTime.now()).millisecondsSinceEpoch - start.millisecondsSinceEpoch;

  if (times.containsKey(p)) {
    times[p] = times[p]! + ms;
  } else {
    times[p] = ms;
  }
}