doooooooooooooooooooooooooooooone
okay boys and girls, here is my solution
int endExec = 0;
long resetDate = 0;
boolean firstExecution = true;
public boolean trackwheelClick(int status, int time) {
if(firstExecution){
resetDate = System.currentTimeMillis() - time;
firstExecution = false;
}
if(time>endExec){
...
//execute an action here
...
endExec= (int)(System.currentTimeMillis() - resetDate);
}
return true;
}
it seems to be working
BUT (because there is always stg to be improved)
it would be more beautiful(with butterflies and little flowers) if I could get the resetDate directly form the device itself.
|