Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Gautam Chitnis
web-ui-redesign
Commits
58bae569
Commit
58bae569
authored
May 24, 2006
by
Rémi Denis-Courmont
Browse files
Fix monotonic clock POSIX option detection
parent
402b2ed2
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/misc/mtime.c
View file @
58bae569
...
...
@@ -190,7 +190,7 @@ mtime_t mdate( void )
#elif defined (HAVE_CLOCK_GETTIME)
struct
timespec
ts
;
# if
def
_POSIX_MONOTONIC_CLOCK
# if
(
_POSIX_MONOTONIC_CLOCK
>= 0)
/* Try to use POSIX monotonic clock if available */
if
(
clock_gettime
(
CLOCK_MONOTONIC
,
&
ts
)
)
# endif
...
...
@@ -257,7 +257,7 @@ void mwait( mtime_t date )
ts
.
tv_sec
=
d
.
quot
;
ts
.
tv_nsec
=
d
.
rem
*
1000
;
# if
def
_POSIX_MONOTONIC_CLOCK
# if
(
_POSIX_MONOTONIC_CLOCK
>= 0)
if
(
clock_nanosleep
(
CLOCK_MONOTONIC
,
0
/*TIMER_ABSTIME*/
,
&
ts
,
NULL
)
)
# endif
(
void
)
clock_nanosleep
(
CLOCK_REALTIME
,
0
,
&
ts
,
NULL
);
...
...
Write
Preview
Supports
Markdown
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