Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
G
glog
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
glog
Commits
1d762fa5
Unverified
Commit
1d762fa5
authored
Jul 26, 2019
by
Rosen Penev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
googletest: Switch to nanosleep
usleep is deprecated and optionally not available with uClibc-ng.
parent
1655f4f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
googletest.h
src/googletest.h
+5
-0
No files found.
src/googletest.h
View file @
1d762fa5
...
...
@@ -574,7 +574,12 @@ class Thread {
static
inline
void
SleepForMilliseconds
(
int
t
)
{
#ifndef OS_WINDOWS
# if defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 199309L
const
struct
timespec
req
=
{
0
,
t
*
1000
*
1000
};
nanosleep
(
&
req
,
NULL
);
# else
usleep
(
t
*
1000
);
# endif
#else
Sleep
(
t
);
#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