introduce interval_measure and move it to Library_Misc