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

Side by Side Diff: mojo/public/c/system/tests/perftest_utils.cc

Issue 2229573002: Change the canonical way to include the C macros.h to <mojo/macros.h>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 4 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 2016 The Chromium Authors. All rights reserved. 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 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 #include "mojo/public/c/system/tests/perftest_utils.h" 5 #include "mojo/public/c/system/tests/perftest_utils.h"
6 6
7 #include <assert.h> 7 #include <assert.h>
8 #include <mojo/macros.h>
8 #include <stddef.h> 9 #include <stddef.h>
9 #include <time.h> 10 #include <time.h>
10 11
11 #include "mojo/public/c/system/macros.h"
12 #include "mojo/public/c/system/time.h" 12 #include "mojo/public/c/system/time.h"
13 #include "mojo/public/cpp/test_support/test_support.h" 13 #include "mojo/public/cpp/test_support/test_support.h"
14 14
15 namespace mojo { 15 namespace mojo {
16 namespace test { 16 namespace test {
17 17
18 // Iterates the given function for |kPerftestTimeMicroseconds| and reports the 18 // Iterates the given function for |kPerftestTimeMicroseconds| and reports the
19 // number of iterations executed per second. 19 // number of iterations executed per second.
20 void IterateAndReportPerf(const char* test_name, 20 void IterateAndReportPerf(const char* test_name,
21 const char* sub_test_name, 21 const char* sub_test_name,
(...skipping 22 matching lines...) Expand all
44 static_cast<time_t>(microseconds / 1000000), // Seconds. 44 static_cast<time_t>(microseconds / 1000000), // Seconds.
45 static_cast<long>(microseconds % 1000000) * 1000L // Nanoseconds. 45 static_cast<long>(microseconds % 1000000) * 1000L // Nanoseconds.
46 }; 46 };
47 int rv = nanosleep(&req, nullptr); 47 int rv = nanosleep(&req, nullptr);
48 MOJO_ALLOW_UNUSED_LOCAL(rv); 48 MOJO_ALLOW_UNUSED_LOCAL(rv);
49 assert(rv == 0); 49 assert(rv == 0);
50 } 50 }
51 51
52 } // namespace test 52 } // namespace test
53 } // namespace mojo 53 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/public/c/system/tests/message_pipe_perftest.cc ('k') | mojo/public/c/system/tests/wait_set_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698