Enable duration values on histograms

This is an implementation of issue #885 that is in current use in our installation.  Feel free to use it directly, or to derive from it in any way.