That's the sentence. I believe it'd be, "I am certain to get hungry when I write in my diary."
I'm just not entirely sure I'm right simply because the it is きた instead of くる, which has me thinking I don't understand something with this grammar...
I understand ～てくる as a way to express something has happened and continues to be happening. So, in this case, the person becomes hungry when they write in their diary and won't stop being hungry until they do something, like eat.
Aye, the more I think about it the more convinced I am I'm missing a point. Help me figure this out once and for all, haha.