build

Builds the Timespan object.

Return

Timespan object.

Throws

if both startTime and endTime are provided and endTime is not after startTime.