Is this really specific to a latency statistic, or is it more general?  At the Bono/Sprout end it is implemented by an accumulator class, which is a class for accumulating any kind of sampled statistic.