When the gods intended to destroy mankind for their sins, they created a sandstorm that would wipe them from the face of the Earth. However, when a young girl appealed to their mercy, they reconsidered. Instead of the destroying the sandstorm, they merely stored it within a hollow glass deep beneath the earth.
The young girl's family would dedicate their lives to protecting the Sandglass of Time and the subsequent Dagger of Time from those who would abuse its power.
Events of The Sands of Time
According to Tamina, the sandstorm that would become known as the "Sands of Time" was intended to wipe out humanity. The Sands, when inside the Dagger of Time, have the power to manipulate time in any capacity when the button beneath the hilt of the weapon is pressed. How long time can be manipulated by the Dagger is dependent on how much sand is stored within the glass hilt of the weapon.
Speculatively, the gods intention may have not to destroy mankind in the sense that they would be killed, but to erase them from existence. Nizam's intentions with the Dagger support this as he intended to use the Sandglass of Time to to prevent his younger self from saving his brother Sharaman from a tiger attack that would've killed him.