An extension of renewal theory