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

Side by Side Diff: base/time_posix.cc

Issue 7108033: Adding missing inclusions (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/time.h" 5 #include "base/time.h"
6 6
7 #include <sys/time.h> 7 #include <sys/time.h>
8 #include <time.h> 8 #include <time.h>
9 #include <unistd.h>
tzik 2011/06/15 09:38:19 for _POSIX_MONOTONIC_CLOCK
9 10
10 #include <limits> 11 #include <limits>
11 12
12 #include "base/basictypes.h" 13 #include "base/basictypes.h"
13 #include "base/logging.h" 14 #include "base/logging.h"
14 15
15 namespace base { 16 namespace base {
16 17
17 struct timespec TimeDelta::ToTimeSpec() const { 18 struct timespec TimeDelta::ToTimeSpec() const {
18 int64 microseconds = InMicroseconds(); 19 int64 microseconds = InMicroseconds();
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 204
204 struct timeval Time::ToTimeVal() const { 205 struct timeval Time::ToTimeVal() const {
205 struct timeval result; 206 struct timeval result;
206 int64 us = us_ - kTimeTToMicrosecondsOffset; 207 int64 us = us_ - kTimeTToMicrosecondsOffset;
207 result.tv_sec = us / Time::kMicrosecondsPerSecond; 208 result.tv_sec = us / Time::kMicrosecondsPerSecond;
208 result.tv_usec = us % Time::kMicrosecondsPerSecond; 209 result.tv_usec = us % Time::kMicrosecondsPerSecond;
209 return result; 210 return result;
210 } 211 }
211 212
212 } // namespace base 213 } // namespace base
OLDNEW
« base/test/test_file_util_linux.cc ('K') | « base/test/test_file_util_linux.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698