https://blog.eternosky.com/posts/software_engineer/interval_segment/
Interval Segment