Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3960)

Unified Diff: base/debug/trace_event_impl.cc

Issue 11411118: Add tracing support to NaCl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unify ppapi_trace_message_filter and child_trace_message_filter Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/debug/trace_event_impl.h ('k') | content/DEPS » ('j') | content/DEPS » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_impl.cc
diff --git a/base/debug/trace_event_impl.cc b/base/debug/trace_event_impl.cc
index 823acbe17726396b25168599476f1c85f5760e88..66872184a1817d62d27fdebf51071f26be4e79fc 100644
--- a/base/debug/trace_event_impl.cc
+++ b/base/debug/trace_event_impl.cc
@@ -627,7 +627,7 @@ int TraceLog::AddTraceEvent(char phase,
num_args, arg_names, arg_types, arg_values);
#endif
- TimeTicks now = TimeTicks::NowFromSystemTraceTime();
+ TimeTicks now = TimeTicks::NowFromSystemTraceTime() - time_offset_;
NotificationHelper notifier(this);
int ret_begin_id = -1;
{
@@ -804,5 +804,9 @@ void TraceLog::SetProcessID(int process_id) {
process_id_hash_ = (offset_basis ^ pid) * fnv_prime;
}
+void TraceLog::SetTimeOffset(TimeDelta offset) {
+ time_offset_ = offset;
+}
+
} // namespace debug
} // namespace base
« no previous file with comments | « base/debug/trace_event_impl.h ('k') | content/DEPS » ('j') | content/DEPS » ('J')

Powered by Google App Engine
This is Rietveld 408576698