For a susceptible-infectious-susceptible (SIS) infection model in a heterogeneous population, we derive simple and precise estimates of mean persistence time, from a quasi-stationary endemic state to extinction of infection. Heterogeneity may be in either individuals' levels of infectiousness or of susceptibility, as well as in individuals' infectious period distributions. Infectious periods are allowed to follow arbitrary non-negative distributions. We also obtain a new and accurate approximation to the quasi-stationary distribution of the process, as well as demonstrating the use of our estimates to investigate the effects of different forms of heterogeneity. Our model may alternatively be interpreted as describing an infection spreading through a heterogeneous directed network, under the annealed network approximation.