Thanks,
it seems to be impossible to fight against time, waiting for the other click in double-click.
If you have many buttons then of course one could use a "boolean" variable for ex. enableDblClick and have it TRUE when you need double-cliks and FALSE when not and exit straight after long or short press. Then of course one should consider if there really is a need for all three functions for one button in the case if there are several buttons in you application. And as suggested, using short, semi-long and long press gives also 3 functions for one button...
Many things are possible, but not exactly all