Modifying a water irrigation timer to count in seconds instead of minutes
I doubt if you can modify that to count in seconds, but you can buy digital sprinkler timers (especially indoor propagation ones) that can be programmed down to the second. 

You'd also need a valve - but the valves for sprinkler timers aren't designed for indoor use. Use at your own risk, etc.

Do you really need seconds? I'd say four or five minutes would be needed to fill a washing machine anyway, and the last bit you'd do manually, because of variance caused by the amount of clothes.