add optional latency parameter

This closes #3 Simplest possible implementation of network latency simulation.