class TimelineUtilities {

    public static TimeSpan scale(TimeSpan span, double factor)
    {
        // Use milliseconds duration to avoid potential month arithmetic.
        Duration delta = new Milliseconds(span.getDurationMs()).multiply(factor / 2.);
        TimeInstant midpoint = span.getMidpointInstant();
        return TimeSpan.get(midpoint.minus(delta), midpoint.plus(delta));
    }

    private  TimelineUtilities();

}