1. To emphasize (focus) that an action was in progress at a specific time,
usewhile + a progressive tense( =While I was eating, …)
2. Otherwise, usewhen + a simple tense. (=When I ate, …)
3. Verbs withwhilehave a duration. The period of the verb cannot be too long or
we lose focus. (=While I was a child=When I was a child)
4. Progressive tenses useaction verbs, so usewhilewith an action verb (While
I was dancing) and not a state verb (While I was hungry)
So as a general rule, you should use “while” in a clause with
a continuous action, using a verb in a continuous tense. Use
“when” in a clause with a single action, using a simple past
or present tense.