Complex sentence: Sterne wrote it in the summer of 1767 as he neared the end of his life and was also writing "A Sentimental Journey".
Split into simpler sentences: Sterne wrote it in the summer of 1767 as he neared the end of his life. At the same time he was writing "A Sentimental Journey".