long tprev = lastevent; lastevent = System.currentTimeMillis(); return (tprev == 0) ? 0 : (lastevent - tprev);
long tprev = evtime; evtime = System.currentTimeMillis(); return (tprev == 0) ? 0 : (evtime - tprev);
public long interval() {    long tprev = lastevent;    lastevent = System.currentTimeMillis();    return (tprev == 0) ? 0 : (lastevent - tprev);}