var button = document.getElementById("my_button");
var timer_id;
button.addEventListener("touchstart", function() {
timer_id = setTimeout(function() {
//событие по истечении 3 сек.
}, 3000);
});
button.addEventListener("touchend", ()=>clearTimeout(timer_id));
button.addEventListener("touchcancel", ()=>clearTimeout(timer_id));