cfg: Log accurate waiting times in cfg_lock().
authorBen Pfaff <blp@nicira.com>
Sat, 20 Jun 2009 00:13:57 +0000 (17:13 -0700)
committerBen Pfaff <blp@nicira.com>
Sat, 20 Jun 2009 00:14:53 +0000 (17:14 -0700)
commit0c7af78c3754f006b347d044131b9c1043b3407a
tree6dc0486b6e9c7c6f3afca93b000afa99ed2c06be
parent6eab8112cf0d53802e49e81c178a28b0a759d1b3
cfg: Log accurate waiting times in cfg_lock().

When cfg_lock() has to block for some time to obtain the configuration file
lock, it logs the amount of time that it waited.  However, it did not
refresh the current time before it began waiting, so the time that it
logged could be off by a significant amount, which make interpreting the
log file more challenging than it should have been.

This change should mainly affect log output.  It should have little or no
effect on Open vSwitch operation because the factor by which the timeouts
were off is an order of magnitude smaller than the actual timeouts that we
pass into the function.

This is related to bug #1426, but it is not a fix for this bug, which will
be committed separately.
lib/cfg.c