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

Side by Side Diff: base/time.h

Issue 6903022: Removed wchar_t from Time::FromString (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed unnecessary blankline. Created 9 years, 5 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/third_party/nspr/prtime.h ('k') | 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) 2011 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 // 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 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 static Time FromInternalValue(int64 us) { 310 static Time FromInternalValue(int64 us) {
311 return Time(us); 311 return Time(us);
312 } 312 }
313 313
314 // Converts a string representation of time to a Time object. 314 // Converts a string representation of time to a Time object.
315 // An example of a time string which is converted is as below:- 315 // An example of a time string which is converted is as below:-
316 // "Tue, 15 Nov 1994 12:45:26 GMT". If the timezone is not specified 316 // "Tue, 15 Nov 1994 12:45:26 GMT". If the timezone is not specified
317 // in the input string, we assume local time. 317 // in the input string, we assume local time.
318 // TODO(iyengar) Move the FromString/FromTimeT/ToTimeT/FromFileTime to 318 // TODO(iyengar) Move the FromString/FromTimeT/ToTimeT/FromFileTime to
319 // a new time converter class. 319 // a new time converter class.
320 static bool FromString(const wchar_t* time_string, Time* parsed_time); 320 static bool FromString(const char* time_string, Time* parsed_time);
321 321
322 // For serializing, use FromInternalValue to reconstitute. Please don't use 322 // For serializing, use FromInternalValue to reconstitute. Please don't use
323 // this and do arithmetic on it, as it is more error prone than using the 323 // this and do arithmetic on it, as it is more error prone than using the
324 // provided operators. 324 // provided operators.
325 int64 ToInternalValue() const { 325 int64 ToInternalValue() const {
326 return us_; 326 return us_;
327 } 327 }
328 328
329 // Fills the given exploded structure with either the local time or UTC from 329 // Fills the given exploded structure with either the local time or UTC from
330 // this time structure (containing UTC). 330 // this time structure (containing UTC).
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 #endif 557 #endif
558 }; 558 };
559 559
560 inline TimeTicks TimeDelta::operator+(TimeTicks t) const { 560 inline TimeTicks TimeDelta::operator+(TimeTicks t) const {
561 return TimeTicks(t.ticks_ + delta_); 561 return TimeTicks(t.ticks_ + delta_);
562 } 562 }
563 563
564 } // namespace base 564 } // namespace base
565 565
566 #endif // BASE_TIME_H_ 566 #endif // BASE_TIME_H_
OLDNEW
« no previous file with comments | « base/third_party/nspr/prtime.h ('k') | base/time.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698