timeval: Provide a variation for time/warp command.
authorGurucharan Shetty <gshetty@nicira.com>
Fri, 6 Jun 2014 16:40:13 +0000 (09:40 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Fri, 13 Jun 2014 18:31:17 +0000 (11:31 -0700)
commit8661af798639aec850458f45bcae05661f955fa4
tree839a9e6b333b100fb071cf1bb06cb08f0941a82d
parent9021969654dda9d43386c3243c15536076e51172
timeval: Provide a variation for time/warp command.

The new command is of the form 'time/warp LARGE_MSECS MSECS'.
It advances the current monotonic time by LARGE_MSECS. This is done MSECS
at a time in each run of the main thread. This gives other threads
time to run after the clock has been advanced by MSECS.

The old command would continue to work.

Rationale: On Windows, process creation is slower. When we have tests
that run 'ovs-appctl time/warp MSECS' hundreds of times in a for loop,
the time it takes to complete the test increases. This is specially
true for bfd tests. For e.g, the 11 bfd tests would take 3.5 minutes
to complete before this change and now takes a little less than 2 minutes.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
lib/poll-loop.c
lib/timeval.c
lib/timeval.h
tests/bfd.at
tests/cfm.at