]>
git.ipfire.org Git - thirdparty/squid.git/blob - test-suite/waiter.c
2 * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
16 main(int argc
, char *argv
[])
24 gettimeofday(&now
, NULL
);
25 alarm
.tv_sec
= now
.tv_sec
+ i
+ (now
.tv_sec
% i
);
27 to
.tv_sec
= alarm
.tv_sec
- now
.tv_sec
;
28 to
.tv_usec
= alarm
.tv_usec
- now
.tv_usec
;
30 to
.tv_usec
+= 1000000;
33 select(1, NULL
, NULL
, NULL
, &to
);