| Index: mojo/edk/embedder/platform_support.h
|
| diff --git a/mojo/edk/embedder/platform_support.h b/mojo/edk/embedder/platform_support.h
|
| index 02186161082252032a601d863a074d0f1294bae1..5b4f0ac23381bb1e9b63db81c213992c48908277 100644
|
| --- a/mojo/edk/embedder/platform_support.h
|
| +++ b/mojo/edk/embedder/platform_support.h
|
| @@ -9,6 +9,7 @@
|
|
|
| #include "mojo/edk/embedder/scoped_platform_handle.h"
|
| #include "mojo/edk/system/system_impl_export.h"
|
| +#include "mojo/public/c/system/types.h"
|
| #include "mojo/public/cpp/system/macros.h"
|
|
|
| namespace mojo {
|
| @@ -23,6 +24,23 @@ class MOJO_SYSTEM_IMPL_EXPORT PlatformSupport {
|
| public:
|
| virtual ~PlatformSupport() {}
|
|
|
| + // Gets a "time-ticks" value:
|
| + // - The value should be nondecreasing with respect to time/causality.
|
| + // - The value should be in microseconds (i.e., if a caller runs
|
| + // continuously, getting the value twice, their difference should be
|
| + // approximately the real time elapsed between the samples, in
|
| + // microseconds).
|
| + // - The value should be nonnegative.
|
| + // - The behaviour of the value if execution is suspended (i.e., the
|
| + // computer "sleeps") is undefined (i.e., this is not a real-time clock),
|
| + // except that it must remain monotonic.
|
| + // - As observable, monotonicity should hold across threads.
|
| + // If multiple |PlatformSupport| implementations/instances are used in a
|
| + // single system, all implementations must agree (i.e., respect the above as
|
| + // if there were only a single |PlatformSupport|).
|
| + virtual MojoTimeTicks GetTimeTicksNow() = 0;
|
| +
|
| + // Gets cryptographically-secure (pseudo)random bytes.
|
| virtual void GetCryptoRandomBytes(void* bytes, size_t num_bytes) = 0;
|
|
|
| virtual PlatformSharedBuffer* CreateSharedBuffer(size_t num_bytes) = 0;
|
|
|