Refactor timed to work as expected with thenables, and document it.