]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Generalize to macintosh; forget Think 3.0.
authorGuido van Rossum <guido@python.org>
Mon, 24 Jun 1991 22:23:45 +0000 (22:23 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 24 Jun 1991 22:23:45 +0000 (22:23 +0000)
Modules/timemodule.c

index 8a18843758c1ffc2f4949975606efa0afbc0b93b..0b8faf2edbe6939b177278858db9da380cb8603f 100644 (file)
@@ -69,14 +69,15 @@ time_time(self, args)
        if (!getnoarg(args))
                return NULL;
        time(&secs);
-#ifdef THINK_C
-#ifndef THINK_C_3_0
+#ifdef applec /* MPW */
 /* Difference in origin between Mac and Unix clocks: */
+/* For THINK C 3.0 add a correction like 5*3600;
+   it converts to UCT from local assuming EST */
 #define TIMEDIFF ((time_t) \
        (((1970-1904)*365L + (1970-1904)/4) * 24 * 3600))
        secs -= TIMEDIFF;
-#endif
-#endif
+/* XXX It's almost better to directly fetch the Mac clock... */
+#endif /* applec */
        return newintobject((long)secs);
 }
 
@@ -112,9 +113,9 @@ time_sleep(self, args)
        return None;
 }
 
-#ifdef THINK_C
+#ifdef macintosh
 #define DO_MILLI
-#endif /* THINK_C */
+#endif
 
 #ifdef AMOEBA
 #define DO_MILLI
@@ -189,7 +190,7 @@ inittime()
 }
 
 
-#ifdef THINK_C
+#ifdef macintosh
 
 #define MacTicks       (* (long *)0x16A)
 
@@ -225,7 +226,7 @@ millitimer()
        return MacTicks * 50 / 3; /* MacTicks * 1000 / 60 */
 }
 
-#endif /* THINK_C */
+#endif /* macintosh */
 
 
 #ifdef BSD_TIME