Distance between randomly spawned objects

Can you describe the rule that you want?

Is it like:

If there is no enemy closer than x pixels from the edge of the screen, check to sometimes spawn a new enemy

Or

If it has been at least x frames / seconds since the last enemy was spawned, check to sometimes spawn a new enemy

Or…?