 while match = matcher.exec(string)
   tokens.push match[0]
 
-timer = new NanoTimer()
-
 testTokens = (tokens, callback) ->
   lookup = (token, done) ->
-    wordnet.lookup token, (err, result) -> done(err)
+    wordnet.lookup token, (result) -> done()
   async.each tokens, lookup, callback
 
 testFunction = (tokens, callback) ->

NanoTimer = require('nanotimer')
async = require('async')

Wordnet = require('../lib/wordnet')
wordnet = new Wordnet()

testText = """

  async.each [1..1000], itemFn, () ->
    callback()

time = (fn) ->
  startTime = microtime.now()
  end = () ->
    endTime = microtime.now()
    elapsed = endTime - startTime
    console.log "It took " + elapsed + " microseconds to process #{tokens.length} tokens #{count} times"

  fn(end)

time (callback) ->
  testFunction tokens, callback
