Permalink
Browse files

Even better US_*

  • Loading branch information...
1 parent 1027af7 commit 57f074a87e6f18f84b8b10bf0e33eed8bb36ea79 @cmr cmr committed Dec 2, 2012
Showing with 7 additions and 6 deletions.
  1. +7 −6 ms.c
View
13 ms.c
@@ -12,12 +12,13 @@
// microseconds
-#define US_SEC 1000000
+#define US_MSEC 1000
+#define US_SEC 1000 * US_MSEC
#define US_MIN 60 * US_SEC
-#define US_HOUR 60 * US_MIN
-#define US_DAY 24 * US_HOUR
-#define US_WEEK 7 * US_DAY
-#define US_YEAR 52 * US_WEEK
+#define US_HOUR 60 * (long long)US_MIN
+#define US_DAY 24 * (long long)US_HOUR
+#define US_WEEK 7 * (long long)US_DAY
+#define US_YEAR 52 * (long long)US_WEEK
// milliseconds
@@ -237,4 +238,4 @@ main(){
return 0;
}
-#endif
+#endif

0 comments on commit 57f074a

Please sign in to comment.