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

Side by Side Diff: base/time.h

Issue 13818027: posix: replace nonstandard futimes call with futimens (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: change Time::ToTimeVal to Time::ToTimeSpec Created 7 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
« no previous file with comments | « base/platform_file_unittest.cc ('k') | base/time_posix.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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 double ToDoubleT() const; 287 double ToDoubleT() const;
288 288
289 // Converts to/from the Javascript convention for times, a number of 289 // Converts to/from the Javascript convention for times, a number of
290 // milliseconds since the epoch: 290 // milliseconds since the epoch:
291 // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/g etTime. 291 // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/g etTime.
292 static Time FromJsTime(double ms_since_epoch); 292 static Time FromJsTime(double ms_since_epoch);
293 double ToJsTime() const; 293 double ToJsTime() const;
294 294
295 #if defined(OS_POSIX) 295 #if defined(OS_POSIX)
296 static Time FromTimeVal(struct timeval t); 296 static Time FromTimeVal(struct timeval t);
297 struct timeval ToTimeVal() const; 297 struct timespec ToTimeSpec() const;
brettw 2013/04/11 18:11:53 It seems weird to me that this isn't symmetric any
298 #endif 298 #endif
299 299
300 #if defined(OS_MACOSX) 300 #if defined(OS_MACOSX)
301 static Time FromCFAbsoluteTime(CFAbsoluteTime t); 301 static Time FromCFAbsoluteTime(CFAbsoluteTime t);
302 CFAbsoluteTime ToCFAbsoluteTime() const; 302 CFAbsoluteTime ToCFAbsoluteTime() const;
303 #endif 303 #endif
304 304
305 #if defined(OS_WIN) 305 #if defined(OS_WIN)
306 static Time FromFileTime(FILETIME ft); 306 static Time FromFileTime(FILETIME ft);
307 FILETIME ToFileTime() const; 307 FILETIME ToFileTime() const;
(...skipping 326 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/platform_file_unittest.cc ('k') | base/time_posix.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698