Solution
What the function does is block until the settling time has expired. The settling time defaults based on the specific type of relay on the instrument but is user-configurable via the
NISWITCH_ATTR_SETTLING_TIME attribute.
It's implemented roughly as follows: When the driver flips the relay, a countdown counter starts in hardware for the duration in
NISWITCH_ATTR_SETTLING_TIME. Users should configure this attribute if the customer's DUT requires longer time for the signal to settle, for example.
The function
niSwitch_WaitForDebounce() is implemented in the driver by polling the hardware fairly aggressively to see if the timer expires. How the polling occurs varies across hardware architectures (e.g. CA4, CA3, SwitchBlock). The function returns with fairly little latency and jitter.