port delay function from clojure