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

Unified Diff: include/core/SkTypes.h

Issue 1811613004: Change SkTime::GetMSecs to double; ensure values stored in SkMSec do not overflow. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Rebase. Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkTime.h ('k') | include/views/SkEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkTypes.h
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index d7a791163be3617b4c414d3f30d4da0982b141d0..a94a59233f6b6596898aa90b1938e7126a092e0d 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -342,13 +342,15 @@ typedef uint32_t SkFourByteTag;
/** 32 bit integer to hold a unicode value
*/
typedef int32_t SkUnichar;
-/** 32 bit value to hold a millisecond count
-*/
+
+/** 32 bit value to hold a millisecond duration
+ * Note that SK_MSecMax is about 25 days.
+ */
typedef uint32_t SkMSec;
/** 1 second measured in milliseconds
*/
#define SK_MSec1 1000
-/** maximum representable milliseconds
+/** maximum representable milliseconds; 24d 20h 31m 23.647s.
*/
#define SK_MSecMax 0x7FFFFFFF
/** Returns a < b for milliseconds, correctly handling wrap-around from 0xFFFFFFFF to 0
« no previous file with comments | « include/core/SkTime.h ('k') | include/views/SkEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698