re-implemented as-timeunit in Clojure