Add mojo/c/system/{time.h,wait.h}.

time.h contains the types (previously in types.h) and
MojoGetTimeTicks() (previously in functions.h).

wait.h contains MojoWait() and MojoWaitMany() (previously in
functions.h).

handle.h gets MojoClose() (previously in functions.h).

Removal of types.h and functions.h will be done separately.

R=jamesr@chromium.org

Review URL: https://codereview.chromium.org/1783623005 .
diff --git a/mojo/edk/embedder/entrypoints.cc b/mojo/edk/embedder/entrypoints.cc
index b6205ce..7ee0c9e 100644
--- a/mojo/edk/embedder/entrypoints.cc
+++ b/mojo/edk/embedder/entrypoints.cc
@@ -6,8 +6,10 @@
 #include "mojo/edk/system/core.h"
 #include "mojo/public/c/system/buffer.h"
 #include "mojo/public/c/system/data_pipe.h"
-#include "mojo/public/c/system/functions.h"
+#include "mojo/public/c/system/handle.h"
 #include "mojo/public/c/system/message_pipe.h"
+#include "mojo/public/c/system/time.h"
+#include "mojo/public/c/system/wait.h"
 
 using mojo::embedder::internal::g_core;
 using mojo::system::MakeUserPointer;
@@ -24,9 +26,9 @@
 }
 
 MojoResult MojoWait(MojoHandle handle,
-                       MojoHandleSignals signals,
-                       MojoDeadline deadline,
-                       MojoHandleSignalsState* signals_state) {
+                    MojoHandleSignals signals,
+                    MojoDeadline deadline,
+                    MojoHandleSignalsState* signals_state) {
   return g_core->Wait(handle, signals, deadline,
                       MakeUserPointer(signals_state));
 }
diff --git a/mojo/edk/embedder/multiprocess_embedder_unittest.cc b/mojo/edk/embedder/multiprocess_embedder_unittest.cc
index 3b860d1..5650a9d 100644
--- a/mojo/edk/embedder/multiprocess_embedder_unittest.cc
+++ b/mojo/edk/embedder/multiprocess_embedder_unittest.cc
@@ -19,8 +19,9 @@
 #include "mojo/edk/util/command_line.h"
 #include "mojo/edk/util/ref_ptr.h"
 #include "mojo/edk/util/waitable_event.h"
-#include "mojo/public/c/system/functions.h"
 #include "mojo/public/c/system/handle.h"
+#include "mojo/public/c/system/time.h"
+#include "mojo/public/c/system/wait.h"
 #include "mojo/public/cpp/system/handle.h"
 #include "mojo/public/cpp/system/macros.h"
 #include "mojo/public/cpp/system/message_pipe.h"
diff --git a/mojo/edk/embedder/system_impl_private_entrypoints.cc b/mojo/edk/embedder/system_impl_private_entrypoints.cc
index 3a159ab..2e6d380 100644
--- a/mojo/edk/embedder/system_impl_private_entrypoints.cc
+++ b/mojo/edk/embedder/system_impl_private_entrypoints.cc
@@ -9,8 +9,11 @@
 #include "mojo/edk/util/ref_ptr.h"
 #include "mojo/public/c/system/buffer.h"
 #include "mojo/public/c/system/data_pipe.h"
-#include "mojo/public/c/system/functions.h"
+#include "mojo/public/c/system/handle.h"
 #include "mojo/public/c/system/message_pipe.h"
+#include "mojo/public/c/system/result.h"
+#include "mojo/public/c/system/time.h"
+#include "mojo/public/c/system/wait.h"
 #include "mojo/public/platform/native/system_impl_private.h"
 
 using mojo::embedder::internal::g_core;
diff --git a/mojo/edk/platform/test_stopwatch.h b/mojo/edk/platform/test_stopwatch.h
index 5a24c9d..ed461eb 100644
--- a/mojo/edk/platform/test_stopwatch.h
+++ b/mojo/edk/platform/test_stopwatch.h
@@ -7,7 +7,7 @@
 #ifndef MOJO_EDK_PLATFORM_TEST_STOPWATCH_H_
 #define MOJO_EDK_PLATFORM_TEST_STOPWATCH_H_
 
-#include "mojo/public/c/system/types.h"
+#include "mojo/public/c/system/time.h"
 #include "mojo/public/cpp/system/macros.h"
 
 namespace mojo {
diff --git a/mojo/edk/platform/thread_utils.h b/mojo/edk/platform/thread_utils.h
index 0336b86..85884c1 100644
--- a/mojo/edk/platform/thread_utils.h
+++ b/mojo/edk/platform/thread_utils.h
@@ -5,7 +5,7 @@
 #ifndef MOJO_EDK_PLATFORM_THREAD_UTILS_H_
 #define MOJO_EDK_PLATFORM_THREAD_UTILS_H_
 
-#include "mojo/public/c/system/types.h"
+#include "mojo/public/c/system/time.h"
 
 namespace mojo {
 namespace platform {
diff --git a/mojo/edk/platform/time_ticks.h b/mojo/edk/platform/time_ticks.h
index 0299ee1..73d702d 100644
--- a/mojo/edk/platform/time_ticks.h
+++ b/mojo/edk/platform/time_ticks.h
@@ -5,7 +5,7 @@
 #ifndef MOJO_EDK_PLATFORM_TIME_TICKS_H_
 #define MOJO_EDK_PLATFORM_TIME_TICKS_H_
 
-#include "mojo/public/c/system/types.h"
+#include "mojo/public/c/system/time.h"
 
 namespace mojo {
 namespace platform {
diff --git a/mojo/edk/system/core.h b/mojo/edk/system/core.h
index f1ce192..1f4abe5 100644
--- a/mojo/edk/system/core.h
+++ b/mojo/edk/system/core.h
@@ -20,7 +20,7 @@
 #include "mojo/public/c/system/handle.h"
 #include "mojo/public/c/system/message_pipe.h"
 #include "mojo/public/c/system/result.h"
-#include "mojo/public/c/system/types.h"
+#include "mojo/public/c/system/time.h"
 #include "mojo/public/cpp/system/macros.h"
 
 namespace mojo {
@@ -83,10 +83,17 @@
   // of these methods is to look at the header files defining the corresponding
   // API functions, referenced below.
 
-  // These methods correspond to the API functions defined in
-  // "mojo/public/c/system/functions.h":
+  // This method corresponds to the API function defined in
+  // "mojo/public/c/system/time.h":
+
   MojoTimeTicks GetTimeTicksNow();
+
+  // This method corresponds to the API function defined in
+  // "mojo/public/c/system/handle.h":
   MojoResult Close(MojoHandle handle);
+
+  // These methods correspond to the API functions defined in
+  // "mojo/public/c/system/wait.h":
   MojoResult Wait(MojoHandle handle,
                   MojoHandleSignals signals,
                   MojoDeadline deadline,
diff --git a/mojo/edk/system/test/timeouts.h b/mojo/edk/system/test/timeouts.h
index aa69ec2..8cfd5a3 100644
--- a/mojo/edk/system/test/timeouts.h
+++ b/mojo/edk/system/test/timeouts.h
@@ -7,7 +7,7 @@
 #ifndef MOJO_EDK_SYSTEM_TEST_TIMEOUTS_H_
 #define MOJO_EDK_SYSTEM_TEST_TIMEOUTS_H_
 
-#include "mojo/public/c/system/types.h"
+#include "mojo/public/c/system/time.h"
 
 namespace mojo {
 namespace system {
diff --git a/mojo/edk/system/waiter.h b/mojo/edk/system/waiter.h
index 9c56fc7..e0bcf47 100644
--- a/mojo/edk/system/waiter.h
+++ b/mojo/edk/system/waiter.h
@@ -12,7 +12,7 @@
 #include "mojo/edk/util/mutex.h"
 #include "mojo/edk/util/thread_annotations.h"
 #include "mojo/public/c/system/result.h"
-#include "mojo/public/c/system/types.h"
+#include "mojo/public/c/system/time.h"
 #include "mojo/public/cpp/system/macros.h"
 
 namespace mojo {
diff --git a/mojo/edk/system/waiter_test_utils.h b/mojo/edk/system/waiter_test_utils.h
index 1a24f20..13bc760 100644
--- a/mojo/edk/system/waiter_test_utils.h
+++ b/mojo/edk/system/waiter_test_utils.h
@@ -14,7 +14,7 @@
 #include "mojo/edk/util/ref_ptr.h"
 #include "mojo/public/c/system/handle.h"
 #include "mojo/public/c/system/result.h"
-#include "mojo/public/c/system/types.h"
+#include "mojo/public/c/system/time.h"
 #include "mojo/public/cpp/system/macros.h"
 
 namespace mojo {