From my experience it seems that the browser does not act immediately on a single click, it waits some milliseconds to see if a second click follows, so that it knows whether to call a single-click action or a double-click action. Just make a simple button and assign a small action like adding "Hello" to a text field. If you try to click it repeatedly with the mouse very fast, the text appears with a lower speed. You need to type in a special rhythm to get the fastest text-appending. Sometimes this is annoying: if I checkmark google-emails for deletion too fast, some boxes are not marked at all although I clicked on them. And some web-calculators "loose" numbers the same way.
So if you want to implement delayed action, you can just use the onClick and onDblClick, there is no problem with overlapping.
If you want to implement fast action, you should assign both onClick and onDblClick to the same action (this would solve my email problem)
And if you want to implement immediate action, use onMouseDown. (But check that mouse was up when entering the box before)