zcip: do not query current time if we won't use the result

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2015-10-24 19:14:04 +02:00
parent bf1866c183
commit 49d51598ac

View File

@ -361,8 +361,10 @@ int zcip_main(int argc UNUSED_PARAM, char **argv)
// make the kernel filter out all packets except // make the kernel filter out all packets except
// ones we'd care about. // ones we'd care about.
} }
// Set deadline_us to the point in time when we timeout if (timeout_ms >= 0) {
deadline_us = MONOTONIC_US() + timeout_ms * 1000; // Set deadline_us to the point in time when we timeout
deadline_us = MONOTONIC_US() + timeout_ms * 1000;
}
VDBG("...wait %d %s nsent=%u\n", VDBG("...wait %d %s nsent=%u\n",
timeout_ms, argv_intf, nsent); timeout_ms, argv_intf, nsent);