How long should I wait to make sure the game is saved?
The game autosaves.
However, when I buy some last hero-upgrades before quitting the game, I often find those upgrades undone when I come back later, thus reducing them precious AFK gainz.
So basically the question would be, in what intervals does the game autosave?
Like games such as Cookie Clicker, the save time for Clicker Heroes is usually around 30 seconds to a minute.
According to Reddit, this game can be found around the web at various places, such as its website, Kongregate and Miniclip and that each version has differences, such as the Steam version does not have a login feature.
But, upon experimentation, the game autosaves approximately every 60 seconds since its launch.
As said in this answer, you can avoid having to wait up to 60 seconds for the autosave to occur (since your last action) is to hit the wrench at the top right corner and then 'save'.
While this doesn't address the autosave interval, here is a manual workaround. If you click the wrench in the top right to open the settings menu, you can manually save the game as a flash cookie. If you do this, you won't lose any data due to autosave syncing errors.