So I was considering the grammar points 間に, うちに and 時に today. I came across this question, which talks about 間に vs うちに (which was already in my grammar book).
I'm more curious about the differences between 時に and these constructs. Specifically, today I wanted to make the sentence "I often make mistakes when I write essays". I wrote
作文を書いている時よく間違いをする
What happens if I write
作文を書いている間によく間違いをする
作文を書いている内によく間違いをする
My current best guess is 時 indicates a general point of time, whereas 間 and 内 represent a specific interval, so 時 is more natural here.
Any ideas? My grammar book describes the difference between 間 and うち, but not how it relates to 時.