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

Unified Diff: util/mac/service_management.cc

Issue 597533002: Add, test, and use clock utilities (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: (no change) Created 6 years, 3 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
« no previous file with comments | « no previous file | util/mac/service_management_test.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: util/mac/service_management.cc
diff --git a/util/mac/service_management.cc b/util/mac/service_management.cc
index 512a6059a9b422318e89df71a00de36fd740d2db..5a9e267a8337b2bf8216e75a7b706c4c9095a16a 100644
--- a/util/mac/service_management.cc
+++ b/util/mac/service_management.cc
@@ -16,10 +16,10 @@
#include <errno.h>
#include <launch.h>
-#include <time.h>
#include "base/mac/scoped_launch_data.h"
#include "util/mac/launchd.h"
+#include "util/misc/clock.h"
namespace {
@@ -96,10 +96,7 @@ bool ServiceManagementRemoveJob(const std::string& label, bool wait) {
// remove the job. Even so, the job’s PID may change between the time it’s
// obtained and the time the kqueue is set up, so this is nontrivial.
do {
- timespec sleep_time;
- sleep_time.tv_sec = 0;
- sleep_time.tv_nsec = 1E5; // 100 microseconds
- nanosleep(&sleep_time, NULL);
+ SleepNanoseconds(1E5); // 100 microseconds
} while (ServiceManagementIsJobLoaded(label));
}
« no previous file with comments | « no previous file | util/mac/service_management_test.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698