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

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: Created 9 years, 8 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
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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 static Time FromInternalValue(int64 us) { 306 static Time FromInternalValue(int64 us) {
307 return Time(us); 307 return Time(us);
308 } 308 }
309 309
310 // Converts a string representation of time to a Time object. 310 // Converts a string representation of time to a Time object.
311 // An example of a time string which is converted is as below:- 311 // An example of a time string which is converted is as below:-
312 // "Tue, 15 Nov 1994 12:45:26 GMT". If the timezone is not specified 312 // "Tue, 15 Nov 1994 12:45:26 GMT". If the timezone is not specified
313 // in the input string, we assume local time. 313 // in the input string, we assume local time.
314 // TODO(iyengar) Move the FromString/FromTimeT/ToTimeT/FromFileTime to 314 // TODO(iyengar) Move the FromString/FromTimeT/ToTimeT/FromFileTime to
315 // a new time converter class. 315 // a new time converter class.
316 static bool FromString(const wchar_t* time_string, Time* parsed_time); 316 static bool FromString(const char* time_string, Time* parsed_time);
317 317
318 // For serializing, use FromInternalValue to reconstitute. Please don't use 318 // For serializing, use FromInternalValue to reconstitute. Please don't use
319 // this and do arithmetic on it, as it is more error prone than using the 319 // this and do arithmetic on it, as it is more error prone than using the
320 // provided operators. 320 // provided operators.
321 int64 ToInternalValue() const { 321 int64 ToInternalValue() const {
322 return us_; 322 return us_;
323 } 323 }
324 324
325 // Fills the given exploded structure with either the local time or UTC from 325 // Fills the given exploded structure with either the local time or UTC from
326 // this time structure (containing UTC). 326 // this time structure (containing UTC).
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 #endif 551 #endif
552 }; 552 };
553 553
554 inline TimeTicks TimeDelta::operator+(TimeTicks t) const { 554 inline TimeTicks TimeDelta::operator+(TimeTicks t) const {
555 return TimeTicks(t.ticks_ + delta_); 555 return TimeTicks(t.ticks_ + delta_);
556 } 556 }
557 557
558 } // namespace base 558 } // namespace base
559 559
560 #endif // BASE_TIME_H_ 560 #endif // BASE_TIME_H_
OLDNEW
« no previous file with comments | « base/third_party/nspr/prtime.h ('k') | base/time.cc » ('j') | base/time.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698