private void addAllocatedCapacity(String id, double newCapacity) {
        Double capacity = allocatedCapacity.get().get(id);
        if (capacity != null)
            newCapacity += capacity;
        allocatedCapacity.get().put(id, newCapacity);
    }
For testing - allows injection of a timer to avoid depending on the system clock
container-search/src/main/java/com/yahoo/search/searchers/RateLimitingSearcher.java