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

Side by Side Diff: base/time.h

Issue 3013029: Fix a bug with parsing ftp directory listing lines. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 4 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 | « no previous file | base/time.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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 a platform-dependent epoch. Each 6 // microseconds (s/1,000,000) since a platform-dependent epoch. Each
7 // platform's epoch, along with other system-dependent clock interface 7 // platform's epoch, along with other system-dependent clock interface
8 // routines, is defined in time_PLATFORM.cc. 8 // routines, is 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 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 struct Exploded { 206 struct Exploded {
207 int year; // Four digit year "2007" 207 int year; // Four digit year "2007"
208 int month; // 1-based month (values 1 = January, etc.) 208 int month; // 1-based month (values 1 = January, etc.)
209 int day_of_week; // 0-based day of week (0 = Sunday, etc.) 209 int day_of_week; // 0-based day of week (0 = Sunday, etc.)
210 int day_of_month; // 1-based day of month (1-31) 210 int day_of_month; // 1-based day of month (1-31)
211 int hour; // Hour within the current day (0-23) 211 int hour; // Hour within the current day (0-23)
212 int minute; // Minute within the current hour (0-59) 212 int minute; // Minute within the current hour (0-59)
213 int second; // Second within the current minute (0-59 plus leap 213 int second; // Second within the current minute (0-59 plus leap
214 // seconds which may take it up to 60). 214 // seconds which may take it up to 60).
215 int millisecond; // Milliseconds within the current second (0-999) 215 int millisecond; // Milliseconds within the current second (0-999)
216
217 bool HasValidValues() const;
brettw 2010/07/27 00:10:27 Can you add a comment saying what this does?
216 }; 218 };
217 219
218 // Contains the NULL time. Use Time::Now() to get the current time. 220 // Contains the NULL time. Use Time::Now() to get the current time.
219 explicit Time() : us_(0) { 221 explicit Time() : us_(0) {
220 } 222 }
221 223
222 // Returns true if the time object has not been initialized. 224 // Returns true if the time object has not been initialized.
223 bool is_null() const { 225 bool is_null() const {
224 return us_ == 0; 226 return us_ == 0;
225 } 227 }
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
529 #endif 531 #endif
530 }; 532 };
531 533
532 inline TimeTicks TimeDelta::operator+(TimeTicks t) const { 534 inline TimeTicks TimeDelta::operator+(TimeTicks t) const {
533 return TimeTicks(t.ticks_ + delta_); 535 return TimeTicks(t.ticks_ + delta_);
534 } 536 }
535 537
536 } // namespace base 538 } // namespace base
537 539
538 #endif // BASE_TIME_H_ 540 #endif // BASE_TIME_H_
OLDNEW
« no previous file with comments | « no previous file | base/time.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698