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

Side by Side Diff: include/core/SkTime.h

Issue 1422513003: SkTime::GetNSecs() (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: #else std::chrono Created 5 years, 1 month 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 | « gyp/tools.gyp ('k') | src/animator/SkTime.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2006 The Android Open Source Project 3 * Copyright 2006 The Android Open Source Project
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 9
10 #ifndef SkTime_DEFINED 10 #ifndef SkTime_DEFINED
(...skipping 16 matching lines...) Expand all
27 uint8_t fDayOfWeek; //!< 0..6, 0==Sunday 27 uint8_t fDayOfWeek; //!< 0..6, 0==Sunday
28 uint8_t fDay; //!< 1..31 28 uint8_t fDay; //!< 1..31
29 uint8_t fHour; //!< 0..23 29 uint8_t fHour; //!< 0..23
30 uint8_t fMinute; //!< 0..59 30 uint8_t fMinute; //!< 0..59
31 uint8_t fSecond; //!< 0..59 31 uint8_t fSecond; //!< 0..59
32 32
33 void toISO8601(SkString* dst) const; 33 void toISO8601(SkString* dst) const;
34 }; 34 };
35 static void GetDateTime(DateTime*); 35 static void GetDateTime(DateTime*);
36 36
37 static SkMSec GetMSecs(); 37 static SkMSec GetMSecs() { return (SkMSec)(GetNSecs() * 1e-6); }
38 static double GetNSecs();
38 }; 39 };
39 40
40 #if defined(SK_DEBUG) && defined(SK_BUILD_FOR_WIN32) 41 #if defined(SK_DEBUG) && defined(SK_BUILD_FOR_WIN32)
41 extern SkMSec gForceTickCount; 42 extern SkMSec gForceTickCount;
42 #endif 43 #endif
43 44
44 #define SK_TIME_FACTOR 1 45 #define SK_TIME_FACTOR 1
45 46
46 /////////////////////////////////////////////////////////////////////////////// 47 ///////////////////////////////////////////////////////////////////////////////
47 48
(...skipping 14 matching lines...) Expand all
62 } 63 }
63 } 64 }
64 private: 65 private:
65 const char* fLabel; 66 const char* fLabel;
66 SkMSec fNow; 67 SkMSec fNow;
67 SkMSec fMinToDump; 68 SkMSec fMinToDump;
68 }; 69 };
69 #define SkAutoTime(...) SK_REQUIRE_LOCAL_VAR(SkAutoTime) 70 #define SkAutoTime(...) SK_REQUIRE_LOCAL_VAR(SkAutoTime)
70 71
71 #endif 72 #endif
OLDNEW
« no previous file with comments | « gyp/tools.gyp ('k') | src/animator/SkTime.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698