Skip to content

Instantly share code, notes, and snippets.

@charles-dyfis-net
Created December 19, 2012 17:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save charles-dyfis-net/73899d73914b4da15d3d to your computer and use it in GitHub Desktop.
Save charles-dyfis-net/73899d73914b4da15d3d to your computer and use it in GitHub Desktop.
(defn -export-Fn-getVal ^String [^clojure.lang.APersistentMap data, ^String key] (get data key))
(defn -export-Fn-windowBatch ^Boolean [^long tsOld, ^long tsNew, ^double secondsPerBatch]
(let [old-batch (long (/ tsOld (* 1000 secondsPerBatch)))
new-batch (long (/ tsNew (* 1000 secondsPerBatch)))]
(boolean (not= old-batch new-batch))))
(gen-class :main false
:name "boundsetter.miniepl.Fn"
:prefix "-export-Fn-"
:methods [#^{:static true} [getVal [clojure.lang.APersistentMap, String] String]
#^{:static true} [percentile ["[Ljava.lang.Double;", Double] Double]
#^{:static true} [windowBatch [long long double] Boolean]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment