Hi, I am trying to write a CLJS (0df1bc4d7b) function that finds out the current system time in milliseconds, equivalent of (System/ currentTimeMillis) in Clojure:
(ns foo) (defn now [] ;; new Date().getTime() (.getTime (js/Date.))) This displays the following when displayed using JavaScript alert("Found " + foo.now()): Found function getTime() { [native code] } When I wrap into a function call (defn now [] ;; new Date().getTime() ((.getTime (js/Date.)))) I see the exception in Firebug: "Can't convert null to object" while executing the following code: return(new Date).getTime.call(null) What am I doing wrong? Shantanu -- 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