toRelativeTimestamp = function toRelativeTimestamp(timestamp) {

        // If no frames yet exist, all timestamps are zero
        if (frames.length === 0)
            return 0;

        // Calculate timestamp relative to first frame
        return timestamp - frames[0].timestamp;

    }
Converts the given absolute timestamp to a timestamp which is relative
to the first frame in the recording.

@private
@param {Number} timestamp
    The timestamp to convert to a relative timestamp.

@returns {Number}
    The difference in milliseconds between the given timestamp and the
    first frame of the recording, or zero if no frames yet exist.