OLD | NEW |
| (Empty) |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // This file contains Mojo system time-related declarations/definitions. | |
6 // | |
7 // Note: This header should be compilable as C. | |
8 | |
9 #ifndef MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_TIME_H_ | |
10 #define MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_TIME_H_ | |
11 | |
12 #include <mojo/macros.h> | |
13 #include <stdint.h> | |
14 | |
15 // |MojoTimeTicks|: A time delta, in microseconds, the meaning of which is | |
16 // source-dependent. | |
17 | |
18 typedef int64_t MojoTimeTicks; | |
19 | |
20 // |MojoDeadline|: Used to specify deadlines (timeouts), in microseconds (except | |
21 // for |MOJO_DEADLINE_INDEFINITE|). | |
22 // |MOJO_DEADLINE_INDEFINITE| - Used to indicate "forever". | |
23 | |
24 typedef uint64_t MojoDeadline; | |
25 | |
26 #define MOJO_DEADLINE_INDEFINITE ((MojoDeadline)-1) | |
27 | |
28 MOJO_BEGIN_EXTERN_C | |
29 | |
30 // |MojoGetTimeTicksNow()|: Returns the time, in microseconds, since some | |
31 // undefined point in the past. The values are only meaningful relative to other | |
32 // values that were obtained from the same device without an intervening system | |
33 // restart. Such values are guaranteed to be monotonically non-decreasing with | |
34 // the passage of real time. Although the units are microseconds, the resolution | |
35 // of the clock may vary and is typically in the range of ~1-15 ms. | |
36 MojoTimeTicks MojoGetTimeTicksNow(void); | |
37 | |
38 MOJO_END_EXTERN_C | |
39 | |
40 #endif // MOJO_PUBLIC_C_INCLUDE_MOJO_SYSTEM_TIME_H_ | |
OLD | NEW |