Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(67)

Side by Side Diff: mojo/edk/system/test/timeouts.h

Issue 1783623005: Add mojo/c/system/{time.h,wait.h}. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Test timeouts. 5 // Test timeouts.
6 6
7 #ifndef MOJO_EDK_SYSTEM_TEST_TIMEOUTS_H_ 7 #ifndef MOJO_EDK_SYSTEM_TEST_TIMEOUTS_H_
8 #define MOJO_EDK_SYSTEM_TEST_TIMEOUTS_H_ 8 #define MOJO_EDK_SYSTEM_TEST_TIMEOUTS_H_
9 9
10 #include "mojo/public/c/system/types.h" 10 #include "mojo/public/c/system/time.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 namespace system { 13 namespace system {
14 namespace test { 14 namespace test {
15 15
16 MojoDeadline DeadlineFromMilliseconds(unsigned milliseconds); 16 MojoDeadline DeadlineFromMilliseconds(unsigned milliseconds);
17 17
18 // A timeout smaller than |TestTimeouts::tiny_timeout()|, as a |MojoDeadline|. 18 // A timeout smaller than |TestTimeouts::tiny_timeout()|, as a |MojoDeadline|.
19 // Warning: This may lead to flakiness, but this is unavoidable if, e.g., you're 19 // Warning: This may lead to flakiness, but this is unavoidable if, e.g., you're
20 // trying to ensure that functions with timeouts are reasonably accurate. We 20 // trying to ensure that functions with timeouts are reasonably accurate. We
21 // want this to be as small as possible without causing too much flakiness. 21 // want this to be as small as possible without causing too much flakiness.
22 MojoDeadline EpsilonTimeout(); 22 MojoDeadline EpsilonTimeout();
23 23
24 // |TestTimeouts::tiny_timeout()|, as a |MojoDeadline|. (Expect this to be on 24 // |TestTimeouts::tiny_timeout()|, as a |MojoDeadline|. (Expect this to be on
25 // the order of 100 ms.) 25 // the order of 100 ms.)
26 MojoDeadline TinyTimeout(); 26 MojoDeadline TinyTimeout();
27 27
28 // |TestTimeouts::action_timeout()|, as a |MojoDeadline|. (Expect this to be on 28 // |TestTimeouts::action_timeout()|, as a |MojoDeadline|. (Expect this to be on
29 // the order of 10 s.) 29 // the order of 10 s.)
30 MojoDeadline ActionTimeout(); 30 MojoDeadline ActionTimeout();
31 31
32 } // namespace test 32 } // namespace test
33 } // namespace system 33 } // namespace system
34 } // namespace mojo 34 } // namespace mojo
35 35
36 #endif // MOJO_EDK_SYSTEM_TEST_TIMEOUTS_H_ 36 #endif // MOJO_EDK_SYSTEM_TEST_TIMEOUTS_H_
OLDNEW
« no previous file with comments | « mojo/edk/system/core.h ('k') | mojo/edk/system/waiter.h » ('j') | mojo/public/c/system/handle.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698