Long press detect circuit using mechanical switch

100 k resistor in series with 100uF capacitor and voltage comparator.