add getDuration() to TimeInterval

see issue #138