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
be84ed03
Commit
be84ed03
authored
Jan 21, 2014
by
Dominic Hamon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove old NOTEs
parent
772ff6f1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
7 deletions
+0
-7
benchmark.cc
src/benchmark.cc
+0
-7
No files found.
src/benchmark.cc
View file @
be84ed03
...
@@ -467,8 +467,6 @@ class State::FastClock {
...
@@ -467,8 +467,6 @@ class State::FastClock {
// This method is very fast.
// This method is very fast.
inline
bool
HasReached
(
int64_t
when_micros
)
{
inline
bool
HasReached
(
int64_t
when_micros
)
{
return
std
::
atomic_load
(
&
approx_time_
)
>=
when_micros
;
return
std
::
atomic_load
(
&
approx_time_
)
>=
when_micros
;
// NOTE: this is the same as we're dealing with an int64_t
// return (base::subtle::NoBarrier_Load(&approx_time_) >= when_micros);
}
}
// Returns the current time in microseconds past the epoch.
// Returns the current time in microseconds past the epoch.
...
@@ -490,8 +488,6 @@ class State::FastClock {
...
@@ -490,8 +488,6 @@ class State::FastClock {
void
InitType
(
Type
type
)
{
void
InitType
(
Type
type
)
{
type_
=
type
;
type_
=
type
;
std
::
atomic_store
(
&
approx_time_
,
NowMicros
());
std
::
atomic_store
(
&
approx_time_
,
NowMicros
());
// NOTE: This is the same barring a memory barrier
// base::subtle::Release_Store(&approx_time_, NowMicros());
}
}
private
:
private
:
...
@@ -524,12 +520,9 @@ class State::FastClock {
...
@@ -524,12 +520,9 @@ class State::FastClock {
ts
.
tv_sec
+=
ts
.
tv_nsec
/
kNumNanosPerSecond
;
ts
.
tv_sec
+=
ts
.
tv_nsec
/
kNumNanosPerSecond
;
ts
.
tv_nsec
%=
kNumNanosPerSecond
;
ts
.
tv_nsec
%=
kNumNanosPerSecond
;
// NOTE: this should probably be platform specific.
pthread_cond_timedwait
(
&
bg_cond_
,
&
bg_mutex_
,
&
ts
);
pthread_cond_timedwait
(
&
bg_cond_
,
&
bg_mutex_
,
&
ts
);
std
::
atomic_store
(
&
approx_time_
,
NowMicros
());
std
::
atomic_store
(
&
approx_time_
,
NowMicros
());
// NOTE: same code but no memory barrier. think on it.
// base::subtle::Release_Store(&approx_time_, NowMicros());
}
}
}
}
...
...
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