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

Unified Diff: components/nacl/renderer/plugin/pnacl_coordinator.cc

Issue 1636303002: PNaCl cleanup: Convert use of NaClGetTimeOfDayMicroseconds() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 4 years, 11 months 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
Index: components/nacl/renderer/plugin/pnacl_coordinator.cc
diff --git a/components/nacl/renderer/plugin/pnacl_coordinator.cc b/components/nacl/renderer/plugin/pnacl_coordinator.cc
index 7b10e54291cc6585a8de448e0c84c3e4bb298146..2b96a933f9af56c51965497c4c1bd85a93ccd3d7 100644
--- a/components/nacl/renderer/plugin/pnacl_coordinator.cc
+++ b/components/nacl/renderer/plugin/pnacl_coordinator.cc
@@ -371,7 +371,7 @@ pp::CompletionCallback PnaclCoordinator::GetCompileProgressCallback(
void PnaclCoordinator::LoadCompiler() {
PLUGIN_PRINTF(("PnaclCoordinator::LoadCompiler"));
- int64_t compiler_load_start_time = NaClGetTimeOfDayMicroseconds();
+ base::TimeTicks compiler_load_start_time = base::TimeTicks::Now();
pp::CompletionCallback load_finished = callback_factory_.NewCallback(
&PnaclCoordinator::RunCompile, compiler_load_start_time);
PnaclResources::ResourceType compiler_type = pnacl_options_.use_subzero
@@ -385,7 +385,7 @@ void PnaclCoordinator::LoadCompiler() {
}
void PnaclCoordinator::RunCompile(int32_t pp_error,
- int64_t compiler_load_start_time) {
+ base::TimeTicks compiler_load_start_time) {
PLUGIN_PRINTF(
("PnaclCoordinator::RunCompile (pp_error=%" NACL_PRId32 ")\n", pp_error));
if (pp_error != PP_OK) {
@@ -395,7 +395,7 @@ void PnaclCoordinator::RunCompile(int32_t pp_error,
return;
}
int64_t compiler_load_time_total =
- NaClGetTimeOfDayMicroseconds() - compiler_load_start_time;
+ (base::TimeTicks::Now() - compiler_load_start_time).InMicroseconds();
GetNaClInterface()->LogTranslateTime("NaCl.Perf.PNaClLoadTime.LoadCompiler",
compiler_load_time_total);
GetNaClInterface()->LogTranslateTime(
@@ -428,7 +428,7 @@ void PnaclCoordinator::LoadLinker(int32_t pp_error) {
return;
}
ErrorInfo error_info;
- int64_t ld_load_start_time = NaClGetTimeOfDayMicroseconds();
+ base::TimeTicks ld_load_start_time = base::TimeTicks::Now();
pp::CompletionCallback load_finished = callback_factory_.NewCallback(
&PnaclCoordinator::RunLink, ld_load_start_time);
// Transfer file_info ownership to the sel_ldr launcher.
@@ -437,7 +437,8 @@ void PnaclCoordinator::LoadLinker(int32_t pp_error) {
ld_file_info, &ld_subprocess_, load_finished);
}
-void PnaclCoordinator::RunLink(int32_t pp_error, int64_t ld_load_start_time) {
+void PnaclCoordinator::RunLink(int32_t pp_error,
+ base::TimeTicks ld_load_start_time) {
PLUGIN_PRINTF(
("PnaclCoordinator::RunLink (pp_error=%" NACL_PRId32 ")\n", pp_error));
if (pp_error != PP_OK) {
@@ -448,7 +449,7 @@ void PnaclCoordinator::RunLink(int32_t pp_error, int64_t ld_load_start_time) {
}
GetNaClInterface()->LogTranslateTime(
"NaCl.Perf.PNaClLoadTime.LoadLinker",
- NaClGetTimeOfDayMicroseconds() - ld_load_start_time);
+ (base::TimeTicks::Now() - ld_load_start_time).InMicroseconds());
translate_thread_->RunLink();
}
« no previous file with comments | « components/nacl/renderer/plugin/pnacl_coordinator.h ('k') | components/nacl/renderer/plugin/pnacl_translate_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698