on (release) { if (p == 2) { timer_2 =getTimer(); if((timer_2 - timer_1)<1000){ ... ... p = 0; } } else { timer_1 =getTimer(); p = 1; } p++; }