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
bc53d710
Commit
bc53d710
authored
Feb 14, 2015
by
evoskuil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix error return for clock_gettime.
parent
759c3e31
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
clock.cpp
src/clock.cpp
+5
-2
No files found.
src/clock.cpp
View file @
bc53d710
...
...
@@ -51,8 +51,10 @@
int
clock_gettime
(
int
clock_id
,
timespec
*
ts
)
{
// The clock_id specified is not supported on this system.
if
(
clock_id
!=
CLOCK_REALTIME
)
return
EINVAL
;
if
(
clock_id
!=
CLOCK_REALTIME
)
{
errno
=
EINVAL
;
return
-
1
;
}
clock_serv_t
cclock
;
mach_timespec_t
mts
;
...
...
@@ -61,6 +63,7 @@ int clock_gettime (int clock_id, timespec *ts)
mach_port_deallocate
(
mach_task_self
(),
cclock
);
ts
->
tv_sec
=
mts
.
tv_sec
;
ts
->
tv_nsec
=
mts
.
tv_nsec
;
return
0
;
}
#endif
...
...
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