OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |