I think a better API here would be to have two separate methods:

    public void setDistance(int distance) { ... }
    public void setRealTime(boolean realTime) { ... }

What do you think?