Is this eye problem part of having type 2 diabetes?

Lately I have been getting sharp pains that feel like they're coming from the inside of my eye, or like from my top eyelid. The pain lasts for about 10 minutes, my eye twitches uncontrollably, then after 10 minutes it's just fine.

Is this caused by having type 2 diabetes? Is it stress? or could it be something else?
I do follow my diet very strictly now, but I do not take the pills the same time every day .. I will start doing that as well