The brain
Each neuron is a leaky integrate-and-fire cell: it collects input, slowly leaks it away, and when it crosses a threshold it fires a spike and resets. Spikes travel along synapses to other neurons, pushing them up (excitatory) or down (inhibitory). The simulation runs in 1 ms steps, in your browser.
The action groups inhibit each other, so one wins at a time. A dog does not eat and run away at once. The winner has to beat the current action clearly, and hold a moment, so the dog does not flicker between behaviours.