Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
benchmark
Project
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
benchmark
Commits
539da112
Commit
539da112
authored
May 11, 2016
by
Dominic Hamon
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #209 from BillyONeal/fix-appveyor
Fix appveyor's older MSVC++ builds by working around 2015 Update 2 bugfix
parents
354b14d1
df9ab801
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
benchmark_test.cc
test/benchmark_test.cc
+2
-1
options_test.cc
test/options_test.cc
+4
-7
No files found.
test/benchmark_test.cc
View file @
539da112
...
...
@@ -186,7 +186,8 @@ static void BM_ManualTiming(benchmark::State& state) {
while
(
state
.
KeepRunning
())
{
auto
start
=
std
::
chrono
::
high_resolution_clock
::
now
();
// Simulate some useful workload with a sleep
std
::
this_thread
::
sleep_for
(
sleep_duration
);
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
duration_cast
<
std
::
chrono
::
nanoseconds
>
(
sleep_duration
));
auto
end
=
std
::
chrono
::
high_resolution_clock
::
now
();
auto
elapsed
=
...
...
test/options_test.cc
View file @
539da112
...
...
@@ -9,14 +9,11 @@ void BM_basic(benchmark::State& state) {
}
void
BM_basic_slow
(
benchmark
::
State
&
state
)
{
int
milliseconds
=
state
.
range_x
();
std
::
chrono
::
duration
<
double
,
std
::
milli
>
sleep_duration
{
static_cast
<
double
>
(
milliseconds
)
};
std
::
chrono
::
milliseconds
sleep_duration
(
state
.
range_x
());
while
(
state
.
KeepRunning
())
{
std
::
this_thread
::
sleep_for
(
sleep_duration
);
std
::
this_thread
::
sleep_for
(
std
::
chrono
::
duration_cast
<
std
::
chrono
::
nanoseconds
>
(
sleep_duration
)
);
}
}
...
...
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