Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
1d2a9ade
Commit
1d2a9ade
authored
Jun 24, 1991
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generalize to macintosh; forget Think 3.0.
parent
76f2f2ef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
8 deletions
+9
-8
Modules/timemodule.c
Modules/timemodule.c
+9
-8
No files found.
Modules/timemodule.c
View file @
1d2a9ade
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment