core: update from upstream

Followed instructions from go/nnapi-dep-instructions.

No manual changes / interventions have been made.

$ git merge origin/master --no-ff
$ git push origin HEAD:refs/for/master

BUG=chromium:1182060
TEST=cq passes

Submitting directly since this repo is not mapped into ChromeOS, but is
used by copybara to populate other repos (libutils, libcutils).

Exempt-From-Owner-Approval: This is a forked repo
Change-Id: I6bf469f2e36264b3d93069b300b7723059e532c4
GitOrigin-RevId: 78faf8a6c10fd46247acc3362d09d81f90b0a51b
diff --git a/Android.bp b/Android.bp
index 1e7cbdb..6201569 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,16 +1,17 @@
-// Copyright (C) 2008 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
+package {
+    default_applicable_licenses: ["system_core_libutils_license"],
+}
+
+license {
+    name: "system_core_libutils_license",
+    visibility: [":__subpackages__"],
+    license_kinds: [
+        "SPDX-license-identifier-Apache-2.0",
+    ],
+    license_text: [
+        "NOTICE",
+    ],
+}
 
 cc_library_headers {
     name: "libutils_headers",
@@ -74,6 +75,7 @@
     cflags: [
         "-Wall",
         "-Werror",
+        "-Wno-exit-time-destructors",
     ],
     header_libs: [
         "libbase_headers",
diff --git a/include/utils/SystemClock.h b/include/utils/SystemClock.h
index 892104c..3c59297 100644
--- a/include/utils/SystemClock.h
+++ b/include/utils/SystemClock.h
@@ -20,11 +20,18 @@
 #include <stdint.h>
 #include <sys/types.h>
 
+// See https://developer.android.com/reference/android/os/SystemClock
+// to learn more about Android's timekeeping facilities.
+
 namespace android {
 
+// Returns milliseconds since boot, not counting time spent in deep sleep.
 int64_t uptimeMillis();
+// Returns nanoseconds since boot, not counting time spent in deep sleep.
 int64_t uptimeNanos();
+// Returns milliseconds since boot, including time spent in sleep.
 int64_t elapsedRealtime();
+// Returns nanoseconds since boot, including time spent in sleep.
 int64_t elapsedRealtimeNano();
 
 }  // namespace android