| 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));
|
| }
|
|
|
|
|