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

Side by Side Diff: base/time/time.cc

Issue 23540009: test IWYU fixups for base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: include iterator in a couple more files Created 7 years, 3 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/time.h" 5 #include "base/time/time.h"
6 6
7 #include <math.h>
8 #include <limits> 7 #include <limits>
8 #include <ostream>
9 9
10 #include "base/float_util.h" 10 #include "base/float_util.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/strings/sys_string_conversions.h"
13 #include "base/third_party/nspr/prtime.h" 12 #include "base/third_party/nspr/prtime.h"
13 #include "base/third_party/nspr/prtypes.h"
14 14
15 namespace base { 15 namespace base {
16 16
17 // TimeDelta ------------------------------------------------------------------ 17 // TimeDelta ------------------------------------------------------------------
18 18
19 int TimeDelta::InDays() const { 19 int TimeDelta::InDays() const {
20 return static_cast<int>(delta_ / Time::kMicrosecondsPerDay); 20 return static_cast<int>(delta_ / Time::kMicrosecondsPerDay);
21 } 21 }
22 22
23 int TimeDelta::InHours() const { 23 int TimeDelta::InHours() const {
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 return is_in_range(month, 1, 12) && 186 return is_in_range(month, 1, 12) &&
187 is_in_range(day_of_week, 0, 6) && 187 is_in_range(day_of_week, 0, 6) &&
188 is_in_range(day_of_month, 1, 31) && 188 is_in_range(day_of_month, 1, 31) &&
189 is_in_range(hour, 0, 23) && 189 is_in_range(hour, 0, 23) &&
190 is_in_range(minute, 0, 59) && 190 is_in_range(minute, 0, 59) &&
191 is_in_range(second, 0, 60) && 191 is_in_range(second, 0, 60) &&
192 is_in_range(millisecond, 0, 999); 192 is_in_range(millisecond, 0, 999);
193 } 193 }
194 194
195 } // namespace base 195 } // namespace base
OLDNEW
« no previous file with comments | « base/time/time.h ('k') | base/time/time_posix.cc » ('j') | sync/notifier/p2p_invalidator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698