He was dying, he thought as blackness overtook him.
He thought he was dying when the blackness overtook him.