Someone who is living on borrowed time or who is on borrowed time has continued to live or to do something for longer than was expected, and is likely to die or be stopped from doing it soon.
Perhaps that illness, diagnosed as fatal, gave him a sense of living on borrowedtime.