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

Side by Side Diff: base/time.h

Issue 42527: - Added support for keeping track of load times.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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
« 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // in which case time will actually go backwards. We don't guarantee that 206 // in which case time will actually go backwards. We don't guarantee that
207 // times are increasing, or that two calls to Now() won't be the same. 207 // times are increasing, or that two calls to Now() won't be the same.
208 static Time Now(); 208 static Time Now();
209 209
210 // Converts to/from time_t in UTC and a Time class. 210 // Converts to/from time_t in UTC and a Time class.
211 // TODO(brettw) this should be removed once everybody starts using the |Time| 211 // TODO(brettw) this should be removed once everybody starts using the |Time|
212 // class. 212 // class.
213 static Time FromTimeT(time_t tt); 213 static Time FromTimeT(time_t tt);
214 time_t ToTimeT() const; 214 time_t ToTimeT() const;
215 215
216 // Converts time to a double which is the number of seconds since epoch 216 // Converts time to/from a double which is the number of seconds since epoch
217 // (Jan 1, 1970). Webkit uses this format to represent time. 217 // (Jan 1, 1970). Webkit uses this format to represent time.
218 static Time FromDoubleT(double dt);
218 double ToDoubleT() const; 219 double ToDoubleT() const;
219 220
221
220 #if defined(OS_WIN) 222 #if defined(OS_WIN)
221 static Time FromFileTime(FILETIME ft); 223 static Time FromFileTime(FILETIME ft);
222 FILETIME ToFileTime() const; 224 FILETIME ToFileTime() const;
223 #endif 225 #endif
224 226
225 // Converts an exploded structure representing either the local time or UTC 227 // Converts an exploded structure representing either the local time or UTC
226 // into a Time class. 228 // into a Time class.
227 static Time FromUTCExploded(const Exploded& exploded) { 229 static Time FromUTCExploded(const Exploded& exploded) {
228 return FromExploded(false, exploded); 230 return FromExploded(false, exploded);
229 } 231 }
(...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 #endif 469 #endif
468 }; 470 };
469 471
470 inline TimeTicks TimeDelta::operator+(TimeTicks t) const { 472 inline TimeTicks TimeDelta::operator+(TimeTicks t) const {
471 return TimeTicks(t.ticks_ + delta_); 473 return TimeTicks(t.ticks_ + delta_);
472 } 474 }
473 475
474 } // namespace base 476 } // namespace base
475 477
476 #endif // BASE_TIME_H_ 478 #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