I did an running hours meter for the outboards on a couple of workboats a few years ago - this one just measured the time the boat's battery voltage was above a particular threshold.
I used a 12V hours meter, gated by the output of a linear comparator that compared a proportion of the supply voltage with a zener reference. I added a mini pot to fine-tune the proportion of the battery voltage that went to the comparator, and an LED to show when the unit was counting.
The whole thing worked off two wires straight off the power supply (which meant I could hide it under the cosole well away from the noisy end of the boat) and was potted inside a bit of square plastic drainpipe with the walls splayed at one end to form mounting flanges.
Theory was that while the engine was running, it would be charging the battery and the system voltage would be higher than when the engine was stopped. The time it took the voltage to decay to the "stop counting" threshold after the engine had stopped was more or less offset by the occasions when the auxilliary loads were greater than the charger capacity on the motor and it all worked reasonably well in practice.
A.