system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: How is the combustion moment timed in a diesel engine?

In a gasoline/propane/ethanol (let's call it ND for short non-diesel) engine, the combustion timing is controlled by the spark plug firing and igniting the air-fuel mixture that has been compressed.

How is this precise timing accomplished in a diesel engine?
gpt
It's not explicitly controlled, but it's anticipated based off of injection timing and boatloads of engine testing. We know that for a given engine, at such and such a speed and load, if we inject at timing A, we'll get combustion at timing B.

Fortunately, these timings are pretty repeatable, particularly with modern high-pressure electronically-controlled injection systems.