means As much or for as long as someone desires. Example The children could explore the garden to their heart's content.