Add code to do the rounding on the new ruler

This is a stop gap that works for now could be improved by removing the
need for rounding but may need bigger changes to the application as a
whole.