The logic of event clocks