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

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

Issue 250243002: Add nanosecond timer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: sigh, just use %u Created 6 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 | « no previous file | include/core/SkTypes.h » ('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 10 matching lines...) Expand all
21 uint16_t fYear; //!< e.g. 2005 21 uint16_t fYear; //!< e.g. 2005
22 uint8_t fMonth; //!< 1..12 22 uint8_t fMonth; //!< 1..12
23 uint8_t fDayOfWeek; //!< 0..6, 0==Sunday 23 uint8_t fDayOfWeek; //!< 0..6, 0==Sunday
24 uint8_t fDay; //!< 1..31 24 uint8_t fDay; //!< 1..31
25 uint8_t fHour; //!< 0..23 25 uint8_t fHour; //!< 0..23
26 uint8_t fMinute; //!< 0..59 26 uint8_t fMinute; //!< 0..59
27 uint8_t fSecond; //!< 0..59 27 uint8_t fSecond; //!< 0..59
28 }; 28 };
29 static void GetDateTime(DateTime*); 29 static void GetDateTime(DateTime*);
30 30
31 static SkMSec GetMSecs(); 31 static SkMSec GetMSecs() { return GetNSecs() / 1000000; }
32
33 static SkNSec GetNSecs();
32 }; 34 };
33 35
34 #if defined(SK_DEBUG) && defined(SK_BUILD_FOR_WIN32) 36 #if defined(SK_DEBUG) && defined(SK_BUILD_FOR_WIN32)
35 extern SkMSec gForceTickCount; 37 extern SkMSec gForceTickCount;
36 #endif 38 #endif
37 39
38 #define SK_TIME_FACTOR 1 40 #define SK_TIME_FACTOR 1
39 41
40 /////////////////////////////////////////////////////////////////////////////// 42 ///////////////////////////////////////////////////////////////////////////////
41 43
(...skipping 14 matching lines...) Expand all
56 } 58 }
57 } 59 }
58 private: 60 private:
59 const char* fLabel; 61 const char* fLabel;
60 SkMSec fNow; 62 SkMSec fNow;
61 SkMSec fMinToDump; 63 SkMSec fMinToDump;
62 }; 64 };
63 #define SkAutoTime(...) SK_REQUIRE_LOCAL_VAR(SkAutoTime) 65 #define SkAutoTime(...) SK_REQUIRE_LOCAL_VAR(SkAutoTime)
64 66
65 #endif 67 #endif
OLDNEW
« no previous file with comments | « no previous file | include/core/SkTypes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698