I don't know if you saw this but you can hold SHIFT and build units en mass, so there should be plenty of time even with 20s to spend all the gold. Using keyboard (1 to select shop and for example Q to select first unit) helps it even more. Against bots you can also simply use pause to have more time to think formation through while learning the game or new faction.