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
95f6a074
Commit
95f6a074
authored
Jan 27, 2012
by
Pieter Hintjens
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #224 from vortechs2000/master
Patch from Mikko Koppanen for #LIBZMQ-301
parents
57f64c50
2e0c4330
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
configure.in
configure.in
+2
-0
clock.cpp
src/clock.cpp
+6
-2
No files found.
configure.in
View file @
95f6a074
...
...
@@ -174,6 +174,8 @@ case "${host_os}" in
# Define on HP-UX to enable all library features
CPPFLAGS="-D_POSIX_C_SOURCE=200112L $CPPFLAGS"
AC_DEFINE(ZMQ_HAVE_HPUX, 1, [Have HPUX OS])
LIBZMQ_CHECK_LANG_FLAG_PREPEND([-Ae])
AC_CHECK_FUNCS(gethrtime)
;;
*mingw32*)
AC_DEFINE(ZMQ_HAVE_WINDOWS, 1, [Have Windows OS])
...
...
src/clock.cpp
View file @
95f6a074
...
...
@@ -34,7 +34,7 @@
#include <sys/time.h>
#endif
#if defined HAVE_CLOCK_GETTIME
#if defined HAVE_CLOCK_GETTIME
|| defined HAVE_GETHRTIME
#include <time.h>
#endif
...
...
@@ -65,7 +65,7 @@ uint64_t zmq::clock_t::now_us ()
double
ticks_div
=
(
double
)
(
ticksPerSecond
.
QuadPart
/
1000000
);
return
(
uint64_t
)
(
tick
.
QuadPart
/
ticks_div
);
#elif defined HAVE_CLOCK_GETTIME
#elif defined HAVE_CLOCK_GETTIME
&& defined CLOCK_MONOTONIC
// Use POSIX clock_gettime function to get precise monotonic time.
struct
timespec
tv
;
...
...
@@ -82,6 +82,10 @@ uint64_t zmq::clock_t::now_us ()
}
return
(
tv
.
tv_sec
*
(
uint64_t
)
1000000
+
tv
.
tv_nsec
/
1000
);
#elif defined HAVE_GETHRTIME
return
(
gethrtime
()
/
1000
);
#else
// Use POSIX gettimeofday function to get precise time.
...
...
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