Neural networks that learn the precise timing of event sequences