Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AndroidSystemCore
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Werner Sembach
AndroidSystemCore
Commits
d38cc182
Commit
d38cc182
authored
Sep 24, 2013
by
Ben Cheng
Committed by
Android (Google) Code Review
Sep 24, 2013
Browse files
Options
Downloads
Plain Diff
Merge "Disable timestamp logging." into klp-dev
parents
397a3642
5cd11817
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
libutils/SystemClock.cpp
+13
-0
13 additions, 0 deletions
libutils/SystemClock.cpp
with
13 additions
and
0 deletions
libutils/SystemClock.cpp
+
13
−
0
View file @
d38cc182
...
...
@@ -61,12 +61,20 @@ int64_t elapsedRealtime()
#define METHOD_IOCTL 1
#define METHOD_SYSTEMTIME 2
/*
* To debug/verify the timestamps returned by the kernel, change
* DEBUG_TIMESTAMP to 1 and call the timestamp routine from a single thread
* in the test program. b/10899829
*/
#define DEBUG_TIMESTAMP 0
static
const
char
*
gettime_method_names
[]
=
{
"clock_gettime"
,
"ioctl"
,
"systemTime"
,
};
#if DEBUG_TIMESTAMP
static
inline
void
checkTimeStamps
(
int64_t
timestamp
,
int64_t
volatile
*
prevTimestampPtr
,
int
volatile
*
prevMethodPtr
,
...
...
@@ -93,6 +101,9 @@ static inline void checkTimeStamps(int64_t timestamp,
*
prevMethodPtr
=
curMethod
;
#endif
}
#else
#define checkTimeStamps(timestamp, prevTimestampPtr, prevMethodPtr, curMethod)
#endif
/*
* native public static long elapsedRealtimeNano();
...
...
@@ -103,8 +114,10 @@ int64_t elapsedRealtimeNano()
struct
timespec
ts
;
int
result
;
int64_t
timestamp
;
#if DEBUG_TIMESTAMP
static
volatile
int64_t
prevTimestamp
;
static
volatile
int
prevMethod
;
#endif
#if 0
/*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment