rename getPeriod to getLength
add getLength method to intervalset