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

Side by Side Diff: src/platform/power_manager/xidle-example.cc

Issue 652147: Add xidle library to power_manager for testing how long the user has been idle (Closed)
Patch Set: Fix issues pointed out by rtc Created 10 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
« no previous file with comments | « src/platform/power_manager/xidle.cc ('k') | src/platform/power_manager/xidle_unittest.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 (c) 2009 The Chromium OS 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 #include <inttypes.h>
6 #include <cstdio>
7 #include "power_manager/xidle.h"
8
9 int main(int argc, char *argv[]) {
10 chromeos::XIdle idle;
11 uint64 idleTime;
12 if (idle.getIdleTime(&idleTime)) {
13 printf("User has been idle for %" PRIu64 " milliseconds\n", idleTime);
14 } else {
15 printf("Cannot calculate idle time\n");
16 }
17 return 0;
18 }
OLDNEW
« no previous file with comments | « src/platform/power_manager/xidle.cc ('k') | src/platform/power_manager/xidle_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698