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

Side by Side Diff: base/time.cc

Issue 11453012: Fix black background when locking with fullscreen window: (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rename undo/stop to cancel Created 8 years 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.h" 5 #include "base/time.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #if defined(OS_WIN) 8 #if defined(OS_WIN)
9 #include <float.h> 9 #include <float.h>
10 #endif 10 #endif
11 11
12 #include <limits> 12 #include <limits>
13 13
14 #include "base/sys_string_conversions.h" 14 #include "base/sys_string_conversions.h"
15 #include "base/third_party/nspr/prtime.h" 15 #include "base/third_party/nspr/prtime.h"
16 16
17 #include "base/logging.h" 17 #include "base/logging.h"
18 18
19 namespace base { 19 namespace base {
20 20
21 // static
22 TimeFactory* TimeFactory::instance_ = NULL;
23
21 namespace { 24 namespace {
22 #if defined(OS_WIN) 25 #if defined(OS_WIN)
23 inline bool isnan(double num) { return !!_isnan(num); } 26 inline bool isnan(double num) { return !!_isnan(num); }
24 #endif 27 #endif
25 } 28 }
26 29
27 // TimeDelta ------------------------------------------------------------------ 30 // TimeDelta ------------------------------------------------------------------
28 31
29 int TimeDelta::InDays() const { 32 int TimeDelta::InDays() const {
30 return static_cast<int>(delta_ / Time::kMicrosecondsPerDay); 33 return static_cast<int>(delta_ / Time::kMicrosecondsPerDay);
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 return is_in_range(month, 1, 12) && 190 return is_in_range(month, 1, 12) &&
188 is_in_range(day_of_week, 0, 6) && 191 is_in_range(day_of_week, 0, 6) &&
189 is_in_range(day_of_month, 1, 31) && 192 is_in_range(day_of_month, 1, 31) &&
190 is_in_range(hour, 0, 23) && 193 is_in_range(hour, 0, 23) &&
191 is_in_range(minute, 0, 59) && 194 is_in_range(minute, 0, 59) &&
192 is_in_range(second, 0, 60) && 195 is_in_range(second, 0, 60) &&
193 is_in_range(millisecond, 0, 999); 196 is_in_range(millisecond, 0, 999);
194 } 197 }
195 198
196 } // namespace base 199 } // namespace base
OLDNEW
« base/test/scoped_time_controller.cc ('K') | « base/time.h ('k') | base/time_mac.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698