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

Side by Side Diff: base/time.h

Issue 11419224: Add missing (and remove superfluous) 'explicit' from constructors. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase + remove non-straightforward changes Created 7 years, 11 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
« no previous file with comments | « base/threading/worker_pool.cc ('k') | base/timer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // Time represents an absolute point in time, internally represented as 5 // Time represents an absolute point in time, internally represented as
6 // microseconds (s/1,000,000) since the Windows epoch (1601-01-01 00:00:00 UTC) 6 // microseconds (s/1,000,000) since the Windows epoch (1601-01-01 00:00:00 UTC)
7 // (See http://crbug.com/14734). System-dependent clock interface routines are 7 // (See http://crbug.com/14734). System-dependent clock interface routines are
8 // defined in time_PLATFORM.cc. 8 // defined in time_PLATFORM.cc.
9 // 9 //
10 // TimeDelta represents a duration of time, internally represented in 10 // TimeDelta represents a duration of time, internally represented in
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 // seconds which may take it up to 60). 234 // seconds which may take it up to 60).
235 int millisecond; // Milliseconds within the current second (0-999) 235 int millisecond; // Milliseconds within the current second (0-999)
236 236
237 // A cursory test for whether the data members are within their 237 // A cursory test for whether the data members are within their
238 // respective ranges. A 'true' return value does not guarantee the 238 // respective ranges. A 'true' return value does not guarantee the
239 // Exploded value can be successfully converted to a Time value. 239 // Exploded value can be successfully converted to a Time value.
240 bool HasValidValues() const; 240 bool HasValidValues() const;
241 }; 241 };
242 242
243 // Contains the NULL time. Use Time::Now() to get the current time. 243 // Contains the NULL time. Use Time::Now() to get the current time.
244 explicit Time() : us_(0) { 244 Time() : us_(0) {
245 } 245 }
246 246
247 // Returns true if the time object has not been initialized. 247 // Returns true if the time object has not been initialized.
248 bool is_null() const { 248 bool is_null() const {
249 return us_ == 0; 249 return us_ == 0;
250 } 250 }
251 251
252 // Returns true if the time object is the maximum time. 252 // Returns true if the time object is the maximum time.
253 bool is_max() const { 253 bool is_max() const {
254 return us_ == std::numeric_limits<int64>::max(); 254 return us_ == std::numeric_limits<int64>::max();
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 #endif 634 #endif
635 }; 635 };
636 636
637 inline TimeTicks TimeDelta::operator+(TimeTicks t) const { 637 inline TimeTicks TimeDelta::operator+(TimeTicks t) const {
638 return TimeTicks(t.ticks_ + delta_); 638 return TimeTicks(t.ticks_ + delta_);
639 } 639 }
640 640
641 } // namespace base 641 } // namespace base
642 642
643 #endif // BASE_TIME_H_ 643 #endif // BASE_TIME_H_
OLDNEW
« no previous file with comments | « base/threading/worker_pool.cc ('k') | base/timer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698