Set duration in YAML file.

Also mark some functions as deprecated.