How to split links generated into an xml sitemap to avoid exceeding 30 sec maximum execution time?

How to split links generated into an xml sitemap to avoid exceeding 30 sec maximum execution time?