function onData(content) {

  process.stdout.write(content);

  var duration = getDuration();

  if (duration < 5) {
    var lastRecord = records[records.length - 1];
    lastRecord.content += content;
    return;
  }

  records.push({
    delay: duration,
    content: content
  });

}
When an input or output is received from the PTY instance

@param {Buffer} content