Re: Is it possible to get only the time with the function 'time'

2012-03-28 Thread Marcus Lindner
Thanks. I will try it. Am 28.03.2012 21:45, schrieb Moritz Ulrich: Looks like it could work. If you want to track even short times, use System/nanoTime. If you're interested, take a look at the implementation of `time': https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L342

Re: Is it possible to get only the time with the function 'time'

2012-03-28 Thread Moritz Ulrich
Looks like it could work. If you want to track even short times, use System/nanoTime. If you're interested, take a look at the implementation of `time': https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L3424 On Wed, Mar 28, 2012 at 21:40, Marcus Lindner wrote: > Something l

Re: Is it possible to get only the time with the function 'time'

2012-03-28 Thread Marcus Lindner
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/curren

Re: Is it possible to get only the time with the function 'time'

2012-03-28 Thread Moritz Ulrich
You should use java interop for this: (java.lang.System/currentTimeMillis) On Wed, Mar 28, 2012 at 21:32, Goldritter 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

Is it possible to get only the time with the function 'time'

2012-03-28 Thread Goldritter
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