I originally wrote this code with 8.1.24, there has been a lot of stuff to happen so I'm not sure exactly what is causing my script to stop working correctly. Seems like there is a change in how Ignition handle mouseDown/mouseUp events. When I click and hold a button with this code, it automatically performs the < 1s action instead of waiting for my finger to lift off the mouse button. (I am still holding down the button when the mouseUp event triggers.
Here is my onMouseDown event script:
def runAction(self, event):
self.custom.mouseDown = time.time()
I just tried this with code from the 8.1.34 Nightly build from last week and the Events worked exactly like I'd expect, where a "held" click executed your else block, and short clicks without any pause always executed the if block. Make sure you don't have any other events which interact with the custom prop in use here, and make sure your actual mouse is in working order.
What is utils? Is that a custom library? Invoking your script as-is resulted in an exception due to that import, and I was forced to remove it in order to verify your code.