Use the API to get the interval for the double-click (you can set it manually in the mouse control panel applet)
As soon as there's a click, set a timer to that interval and when that time is passed and there hasn't been clicked again, you know they didn't double-click...