Move Stopwatch to libnetdutils
Move Stopwatch to libnetdutils as it is an useful utility across
netd and the resolver library.
Bug: 128662167
Test: system/netd/tests/runtests.sh passed
Change-Id: Iebaffc66202fbe3a787ca645847762af1ed94bd7
diff --git a/server/SockDiag.cpp b/server/SockDiag.cpp
index 5caf347..33c523a 100644
--- a/server/SockDiag.cpp
+++ b/server/SockDiag.cpp
@@ -30,13 +30,11 @@
#include <android-base/strings.h>
#include <log/log.h>
+#include <netdutils/Stopwatch.h>
#include "NetdConstants.h"
#include "Permission.h"
#include "SockDiag.h"
-#include "Stopwatch.h"
-
-#include <chrono>
#ifndef SOCK_DESTROY
#define SOCK_DESTROY 21
@@ -45,8 +43,10 @@
#define INET_DIAG_BC_MARK_COND 10
namespace android {
-namespace net {
+using netdutils::Stopwatch;
+
+namespace net {
namespace {
int checkError(int fd) {