Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
20a11fd6
Commit
20a11fd6
authored
Nov 13, 2017
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 13, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt/tests: Rewrite clock() tests.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
247faa85
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
time.c
dlls/msvcrt/tests/time.c
+12
-12
No files found.
dlls/msvcrt/tests/time.c
View file @
20a11fd6
...
...
@@ -875,18 +875,18 @@ static void test__tzset(void)
static
void
test_clock
(
void
)
{
static
const
int
THRESH
=
5
0
;
clock_t
s
,
e
;
int
i
;
for
(
i
=
0
;
i
<
10
;
i
++
)
{
s
=
clock
(
);
Sleep
(
1000
);
e
=
clock
()
;
ok
(
abs
((
e
-
s
)
-
1000
)
<
THRESH
,
"clock off on loop %i: %i
\n
"
,
i
,
e
-
s
);
}
static
const
int
THRESH
=
10
0
;
FILETIME
start
,
cur
;
int
c
,
expect
;
ok
(
GetProcessTimes
(
GetCurrentProcess
(),
&
start
,
&
cur
,
&
cur
,
&
cur
),
"GetProcessTimes failed with error: %d
\n
"
,
GetLastError
());
GetSystemTimeAsFileTime
(
&
cur
);
expect
=
(((
LONGLONG
)
cur
.
dwHighDateTime
<<
32
)
+
cur
.
dwLowDateTime
-
((
LONGLONG
)
start
.
dwHighDateTime
<<
32
)
-
start
.
dwLowDateTime
)
/
10000
;
c
=
clock
(
);
ok
(
abs
(
c
-
expect
)
<
THRESH
,
"clock() = %d, expected %d
\n
"
,
c
,
expect
);
}
START_TEST
(
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