Code to detect single or double click

doupleClickEvent arose if counter==2 in timeframe X. :nerd_face: