我正在尝试使用NEsper,并且我想创建从insert开始需要时间的语句作为返回字段。
示例:从Blah.win:time中选择平均((insertTime- now))作为timeElapsed (1分钟)
这个是可能的吗?我可以绕过获取insertTime的方法,但是有now功能吗?
发布于 2012-05-27 21:40:08
您可以使用current_timestamp。它以毫秒为单位返回当前时间。例如select avg((insertTime - current_timestamp))
有关更多信息,请访问:http://esper.codehaus.org/esper-2.1.0/doc/reference/en/html/functionreference.html
https://stackoverflow.com/questions/9607641
复制相似问题