Something like this?

(tracktime [f]
    let [    start (System/currentTimeMillis)
               result (f)
               end (System/currentTimeMillis)]
(vector result (- end start)))



Am 28.03.2012 21:34, schrieb Moritz Ulrich:
You should use java interop for this:

(java.lang.System/currentTimeMillis)

On Wed, Mar 28, 2012 at 21:32, Goldritter
<marcus.goldritter.lind...@googlemail.com>  wrote:
I wanted to aks if it is possible to get only the passed milliseconds
from the function 'time' without the sentence "Elapsed time: 0.119
msecs". I would only need the 0.119 and best as a number and not as a
String.
Or have I to write a function which extracts the number out of the
String?

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en



--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to