Netflix/servo — pull request #235 by brharrington (2014-04-21 16:18:28+00:00)
Title: Highly concurrent counters spuriously show only 1 increment for some intervals

If there is a context switch between getting the current time and performing an action on the atomic long it is possible to end up switching buckets rapidly by going forward, back, and then forward again. This usually means the value that is sampled will only include the result from the middle back again iteration.

This change checks that the step boundary is increasing before switching the value. It also ensures that getCurrent will always return the same atomic long instance for a given poller index so that changes for the activity cannot be altering the stored value for the previous interval.