Use gettimeofday() and struct timevals instead of time()
Initially I thought using the second precision time() function is good enough, but to make t/113-urgent.t considerably faster (>2s vs. 0.08s), we put in a little more effort and use gettimeofday. Otherwise, this test blocks the whole testsuite from completing much faster on modern machines :).
This commit is contained in:
@ -95,10 +95,6 @@ is($x->input_focus, $different_window->id, 'new window focused again');
|
||||
$top->add_hint('urgency');
|
||||
sync_with_i3;
|
||||
|
||||
# Unfortunately, we cannot get rid of this delay. We need it because i3 stores
|
||||
# the time of an urgency hint with second precision.
|
||||
sleep 1;
|
||||
|
||||
$bottom->add_hint('urgency');
|
||||
sync_with_i3;
|
||||
|
||||
@ -123,10 +119,6 @@ is($x->input_focus, $different_window->id, 'new window focused again');
|
||||
$top->add_hint('urgency');
|
||||
sync_with_i3;
|
||||
|
||||
# Unfortunately, we cannot get rid of this delay. We need it because i3 stores
|
||||
# the time of an urgency hint with second precision.
|
||||
sleep 1;
|
||||
|
||||
$bottom->add_hint('urgency');
|
||||
sync_with_i3;
|
||||
|
||||
|
Reference in New Issue
Block a user