Changeset 7948


Ignore:
Timestamp:
Dec 26, 2007, 7:58:17 AM (12 years ago)
Author:
gb
Message:

INTERNAL-TIME-UNITS-PER-SECOND, whostate tweaks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-1/l1-lisp-threads.lisp

    r7624 r7948  
    8484  (rlet ((tv :timeval))
    8585    (#_gettimeofday tv (%null-ptr))
    86     (let* ((micros (truncate (the fixnum (pref tv :timeval.tv_usec)) 1000))
     86    (let* ((units (truncate (the fixnum (pref tv :timeval.tv_usec)) (/ 1000000 internal-time-units-per-second)))
    8787           (initial *internal-real-time-session-seconds*))
    8888      (if initial
    8989        (locally
    9090            (declare (type (unsigned-byte 32) initial))
    91           (+ (* 1000 (the (unsigned-byte 32)
    92                        (- (the (unsigned-byte 32) (pref tv :timeval.tv_sec))
    93                           initial))) micros))
     91          (+ (* internal-time-units-per-second
     92                (the (unsigned-byte 32)
     93                  (- (the (unsigned-byte 32) (pref tv :timeval.tv_sec))
     94                     initial)))
     95             units))
    9496        (progn
    9597          (setq *internal-real-time-session-seconds*
    9698                (pref tv :timeval.tv_sec))
    97           micros)))))
     99          units)))))
    98100
    99101(defun get-tick-count ()
     
    10981100    (setq *current-lisp-thread* thread
    10991101          *current-process*
    1100           (make-process "foreign" :thread thread))
    1101     (setf (%process-whostate *current-process*) "Foreign thread callback")))
     1102          (make-process "foreign" :thread thread)
     1103          *whostate* "Foreign thread callback")))
    11021104   
    11031105;;; Remove the foreign thread's lisp-thread and lisp process from
Note: See TracChangeset for help on using the changeset viewer.