This is simple algebra. FlowTotal = rate x time. If you have a one second timer you divide the rate by 60 to get gallons per second and add it to your existing total to get the new total. You may need to use another register to get thousand gallons or whatever and zero out your totalizer to avoid overflow.