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

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

Issue 1930863003: Make SkTime SK_API so that SkTime::GetDateTime() is visible to the clients. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 | no next file » | 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
11 #define SkTime_DEFINED 11 #define SkTime_DEFINED
12 12
13 #include "SkTypes.h" 13 #include "SkTypes.h"
14 14
15 class SkString; 15 class SkString;
16 16
17 /** \class SkTime 17 /** \class SkTime
18 Platform-implemented utilities to return time of day, and millisecond counte r. 18 Platform-implemented utilities to return time of day, and millisecond counte r.
19 */ 19 */
20 class SkTime { 20 class SK_API SkTime {
21 public: 21 public:
22 struct DateTime { 22 struct DateTime {
23 int16_t fTimeZoneMinutes; // The number of minutes that GetDateTime() 23 int16_t fTimeZoneMinutes; // The number of minutes that GetDateTime()
24 // is ahead of or behind UTC. 24 // is ahead of or behind UTC.
25 uint16_t fYear; //!< e.g. 2005 25 uint16_t fYear; //!< e.g. 2005
26 uint8_t fMonth; //!< 1..12 26 uint8_t fMonth; //!< 1..12
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
(...skipping 21 matching lines...) Expand all
52 uint64_t dur = static_cast<uint64_t>(SkTime::GetMSecs() - fNow); 52 uint64_t dur = static_cast<uint64_t>(SkTime::GetMSecs() - fNow);
53 SkDebugf("%s %ld\n", fLabel ? fLabel : "", dur); 53 SkDebugf("%s %ld\n", fLabel ? fLabel : "", dur);
54 } 54 }
55 private: 55 private:
56 const char* fLabel; 56 const char* fLabel;
57 double fNow; 57 double fNow;
58 }; 58 };
59 #define SkAutoTime(...) SK_REQUIRE_LOCAL_VAR(SkAutoTime) 59 #define SkAutoTime(...) SK_REQUIRE_LOCAL_VAR(SkAutoTime)
60 60
61 #endif 61 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698