Erlang intervals library cutten from scalaris project.