Adds parse_duration() and updates cooldown to use this.

Closes issue #421