mirror of https://github.com/python/cpython
Generalize to macintosh; forget Think 3.0.
This commit is contained in:
parent
76f2f2ef67
commit
1d2a9ade93
|
@ -69,14 +69,15 @@ time_time(self, args)
|
||||||
if (!getnoarg(args))
|
if (!getnoarg(args))
|
||||||
return NULL;
|
return NULL;
|
||||||
time(&secs);
|
time(&secs);
|
||||||
#ifdef THINK_C
|
#ifdef applec /* MPW */
|
||||||
#ifndef THINK_C_3_0
|
|
||||||
/* Difference in origin between Mac and Unix clocks: */
|
/* 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) \
|
#define TIMEDIFF ((time_t) \
|
||||||
(((1970-1904)*365L + (1970-1904)/4) * 24 * 3600))
|
(((1970-1904)*365L + (1970-1904)/4) * 24 * 3600))
|
||||||
secs -= TIMEDIFF;
|
secs -= TIMEDIFF;
|
||||||
#endif
|
/* XXX It's almost better to directly fetch the Mac clock... */
|
||||||
#endif
|
#endif /* applec */
|
||||||
return newintobject((long)secs);
|
return newintobject((long)secs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,9 +113,9 @@ time_sleep(self, args)
|
||||||
return None;
|
return None;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef THINK_C
|
#ifdef macintosh
|
||||||
#define DO_MILLI
|
#define DO_MILLI
|
||||||
#endif /* THINK_C */
|
#endif
|
||||||
|
|
||||||
#ifdef AMOEBA
|
#ifdef AMOEBA
|
||||||
#define DO_MILLI
|
#define DO_MILLI
|
||||||
|
@ -189,7 +190,7 @@ inittime()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef THINK_C
|
#ifdef macintosh
|
||||||
|
|
||||||
#define MacTicks (* (long *)0x16A)
|
#define MacTicks (* (long *)0x16A)
|
||||||
|
|
||||||
|
@ -225,7 +226,7 @@ millitimer()
|
||||||
return MacTicks * 50 / 3; /* MacTicks * 1000 / 60 */
|
return MacTicks * 50 / 3; /* MacTicks * 1000 / 60 */
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* THINK_C */
|
#endif /* macintosh */
|
||||||
|
|
||||||
|
|
||||||
#ifdef BSD_TIME
|
#ifdef BSD_TIME
|
||||||
|
|
Loading…
Reference in New Issue