#514 Removing TimeUnit from api and replace with Duration
Merge contribution from Glenn Saqui.

Closes #514.