if ((end = parent.getChild(idx).getValue().getStartTime()) > millis) {
break;
}
}
if (idx > 0) {
GwtNode node = (GwtNode) parent.getChild(idx - 1);
model.updateNodeAndItsParents(node, node.withEndTime(millis));
}
if (idx >= parent.getChildCount()) {
end = Math.max(millis, parent.getValue().getEndTime());
}
GwtNode node = new GwtNode(getClassName(event), module, millis, end);
model.addNodeAndUpdateItsParents(parent, node, idx);
} else if (END.equals(type)) {
parent = findOrCreateChild(model, parent, "onModuleLoad", millis, millis);
if (parent.getChildCount() > 0) {
GwtNode node = (GwtNode) parent.getChild(parent.getChildCount() - 1);
model.updateNodeAndItsParents(node, node.withEndTime(millis));
}
}
}