Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
L
libzmq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
libzmq
Commits
35c6985e
Commit
35c6985e
authored
Nov 18, 2018
by
Luca Boccassi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Problem: zmq_stopwatch_intermediate is eligible for STABLE
Solution: do it
parent
22c3ecc4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
2 additions
and
12 deletions
+2
-12
NEWS
NEWS
+2
-0
zmq.h
include/zmq.h
+0
-2
zmq_draft.h
src/zmq_draft.h
+0
-4
test_timers.cpp
tests/test_timers.cpp
+0
-6
No files found.
NEWS
View file @
35c6985e
...
...
@@ -29,6 +29,8 @@
- ZMQ_EVENT_HANDSHAKE_FAILED_PROTOCOL: Protocol errors with peers or ZAP.
- ZMQ_EVENT_HANDSHAKE_FAILED_AUTH: Failed authentication requests.
See doc/zmq_socket_monitor.txt for more details and error codes.
- zmq_stopwatch_intermediate which returns the time elapsed without stopping
the stopwatch.
* The build-time configuration option to select the poller has been split, and
new API_POLLER (CMake) and --with-api-poller (autoconf) options will now
...
...
include/zmq.h
View file @
35c6985e
...
...
@@ -610,11 +610,9 @@ ZMQ_EXPORT int zmq_timers_execute (void *timers);
/* Starts the stopwatch. Returns the handle to the watch. */
ZMQ_EXPORT
void
*
zmq_stopwatch_start
(
void
);
#ifdef ZMQ_BUILD_DRAFT_API
/* Returns the number of microseconds elapsed since the stopwatch was */
/* started, but does not stop or deallocate the stopwatch. */
ZMQ_EXPORT
unsigned
long
zmq_stopwatch_intermediate
(
void
*
watch_
);
#endif
/* Stops the stopwatch. Returns the number of microseconds elapsed since */
/* the stopwatch was started, and deallocates that watch. */
...
...
src/zmq_draft.h
View file @
35c6985e
...
...
@@ -37,10 +37,6 @@
#ifndef ZMQ_BUILD_DRAFT_API
/* Returns the number of microseconds elapsed since the stopwatch was */
/* started, but does not stop or deallocate the stopwatch. */
unsigned
long
zmq_stopwatch_intermediate
(
void
*
watch_
);
/* DRAFT Socket types. */
#define ZMQ_SERVER 12
#define ZMQ_CLIENT 13
...
...
tests/test_timers.cpp
View file @
35c6985e
...
...
@@ -156,21 +156,17 @@ void test_timers ()
// Timer should not have been invoked yet
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_timers_execute
(
timers
));
#ifdef ZMQ_BUILD_DRAFT_API
if
(
zmq_stopwatch_intermediate
(
stopwatch
)
<
full_timeout
)
{
TEST_ASSERT_FALSE
(
timer_invoked
);
}
#endif
// Wait half the time and check again
long
timeout
=
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_timers_timeout
(
timers
));
msleep
(
timeout
/
2
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_timers_execute
(
timers
));
#ifdef ZMQ_BUILD_DRAFT_API
if
(
zmq_stopwatch_intermediate
(
stopwatch
)
<
full_timeout
)
{
TEST_ASSERT_FALSE
(
timer_invoked
);
}
#endif
// Wait until the end
TEST_ASSERT_SUCCESS_ERRNO
(
sleep_and_execute
(
timers
));
...
...
@@ -181,11 +177,9 @@ void test_timers ()
timeout
=
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_timers_timeout
(
timers
));
msleep
(
timeout
/
2
);
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_timers_execute
(
timers
));
#ifdef ZMQ_BUILD_DRAFT_API
if
(
zmq_stopwatch_intermediate
(
stopwatch
)
<
2
*
full_timeout
)
{
TEST_ASSERT_FALSE
(
timer_invoked
);
}
#endif
// Reset timer and wait half of the time left
TEST_ASSERT_SUCCESS_ERRNO
(
zmq_timers_reset
(
timers
,
timer_id
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment