1

I'm trying to use NEsper and I want to create statements that takes time since insert as a return field.

ex: select avg((insertTime - now)) as timeElapsed from Blah.win:time(1 min)

Is this possible? I can hack around getting insertTime but is there a now function?

teriyaki
  • 155
  • 8

1 Answers1

1

You can use current_timestamp. It returns the current time in milliseconds. For example select avg((insertTime - current_timestamp))

See there for more information: http://esper.codehaus.org/esper-2.1.0/doc/reference/en/html/functionreference.html

punkyduck
  • 669
  • 2
  • 9
  • 17