Measure time main-loop spends waiting for locks, and warn if above 10ms.

Microsecond precision.