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

Side by Side Diff: systrace/atrace_helper/jni/time_utils.h

Issue 2946033002: Android systrace: Optimize memory dumps. (Closed)
Patch Set: tiny fix Created 3 years, 5 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
« no previous file with comments | « systrace/atrace_helper/jni/procfs_utils.cc ('k') | systrace/atrace_helper/jni/time_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2017 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 #ifndef TIME_UTILS_H_
6 #define TIME_UTILS_H_
7
8 #include <stdint.h>
9
10 namespace time_utils {
11
12 uint64_t GetTimestamp();
13
14 class PeriodicTimer {
15 public:
16 PeriodicTimer(int interval_ms);
17 ~PeriodicTimer();
18
19 void Start();
20 void Stop();
21 // Wait for next tick. Returns false if interrupted by Stop() or not started.
22 bool Wait();
23
24 private:
25 PeriodicTimer(const PeriodicTimer&) = delete;
26 void operator=(const PeriodicTimer&) = delete;
27
28 const int interval_ms_;
29 int timer_fd_;
30 };
31
32 } // namespace time_utils
33
34 #endif // TIME_UTILS_
OLDNEW
« no previous file with comments | « systrace/atrace_helper/jni/procfs_utils.cc ('k') | systrace/atrace_helper/jni/time_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698