This repository was archived by the owner on Dec 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +45
-2
lines changed Expand file tree Collapse file tree 3 files changed +45
-2
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ workflows:
88 build_and_test_all :
99 jobs :
1010 - build-test-linux
11+ - build-test-linux-32bit
1112 - build-test-osx
1213 - build-test-windows
1314
3233 cd build
3334 CTEST_OUTPUT_ON_FAILURE=1 make test
3435
36+ build-test-linux-32bit :
37+ docker :
38+ - image : i386/ubuntu:18.04
39+ - image : redis
40+ environment :
41+ CTEST_OUTPUT_ON_FAILURE : 1
42+ steps :
43+ - checkout
44+ - run :
45+ name : Install dependencies
46+ command : |
47+ apt-get update -y
48+ apt-get install -y \
49+ libcurl4-openssl-dev \
50+ libpcre3-dev \
51+ libhiredis-dev \
52+ build-essential \
53+ cmake
54+ - run :
55+ name : Build
56+ command : |
57+ mkdir build && cd build
58+ cmake -D REDIS_STORE=ON ..
59+ cmake --build .
60+ - run :
61+ name : Test
62+ command : |
63+ cd build
64+ CTEST_OUTPUT_ON_FAILURE=1 make test
65+
3566 build-test-osx :
3667 macos :
3768 xcode : " 9.0"
Original file line number Diff line number Diff line change 1616 #include <windows.h>
1717#else
1818 #include <unistd.h>
19+ #include <errno.h>
1920#endif
2021
2122int
@@ -67,10 +68,20 @@ LDi_sleepMilliseconds(const unsigned long milliseconds)
6768 return true;
6869 #else
6970 int status ;
71+ useconds_t usec ;
7072
71- if ((status = usleep (1000 * milliseconds )) != 0 ) {
73+ if (milliseconds >= 1000 ) {
74+ usec = 999999 ;
75+
76+ LD_LOG (LD_LOG_WARNING ,
77+ "LDi_sleepMilliseconds capping usleep at 999999" );
78+ } else {
79+ usec = milliseconds * 1000 ;
80+ }
81+
82+ if ((status = usleep (usec )) != 0 ) {
7283 LD_LOG_1 (LD_LOG_CRITICAL , "usleep failed with: %s" ,
73- strerror (status ));
84+ strerror (errno ));
7485
7586 LD_ASSERT (false);
7687
Original file line number Diff line number Diff line change 2727
2828#define LD_UUID_SIZE 36
2929
30+ /* limited to 1 second */
3031bool LDi_sleepMilliseconds (const unsigned long milliseconds );
3132bool LDi_getMonotonicMilliseconds (double * const resultMilliseconds );
3233bool LDi_getUnixMilliseconds (double * const resultMilliseconds );
You can’t perform that action at this time.
0 commit comments