Fixed issue #4: Added duration() method to Rest.