%other-pointer-widetag derive-type: derive for simple-array.
[sbcl.git] / src / code / early-time.lisp
blobd2bfd8135e1dc310501bf089b4a3de94295a45a9
1 ;;;; Time-related constants that are needed before unix.lisp / win32.lisp
2 ;;;; can be built.
4 ;;;; This software is part of the SBCL system. See the README file for
5 ;;;; more information.
6 ;;;;
7 ;;;; This software is derived from the CMU CL system, which was
8 ;;;; written at Carnegie Mellon University and released into the
9 ;;;; public domain. The software is in the public domain and is
10 ;;;; provided with absolutely no warranty. See the COPYING and CREDITS
11 ;;;; files for more information.
13 (in-package "SB-IMPL")
15 (defconstant internal-time-units-per-second
16 #+64-bit 1000000 ; microseconds
17 ;; 1 week in milliseconds is: (* 1000 60 60 24 7) = 604800000 which is
18 ;; a 30-bit number, but there are only 29 bits in a positive fixnum.
19 ;; It is left as an exercise to change the 32-bit code to use hundredths
20 ;; instead of thousands of a second. The upside of so doing is that
21 ;; GET-INTERNAL-REAL-TIME would be able to express more range without consing.
22 ;; The downside is of course decreased resolution.
23 #-64-bit 1000 ; milliseconds
24 "The number of internal time units that fit into a second. See
25 GET-INTERNAL-REAL-TIME and GET-INTERNAL-RUN-TIME.")
27 (defconstant unix-to-universal-time 2208988800)