public Snapshot with(State state, Instant at) {
        if (!canChangeTo(state)) {
            throw new IllegalArgumentException("Cannot change state of " + this + " to " + state);
        }
        return new Snapshot(id, hostname, state, history.with(state, at), cluster, clusterIndex, cloudAccount, key);
    }
Returns how long this snapshot has been idle at given instant
node-repository/src/main/java/com/yahoo/vespa/hosted/provision/backup/Snapshot.java