Changeset 8730


Ignore:
Timestamp:
Mar 11, 2008, 7:01:39 PM (11 years ago)
Author:
gb
Message:

GET-UNIVERSAL-TIME for windows. (May not be necessary, if
#_gettimeofday is available in C lib; I had some missing headers
when I wrote this.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/win64/lib/time.lisp

    r7955 r8730  
    4646  "Return a single integer for the current time of
    4747   day in universal time format."
     48  #-windows-target
    4849  (rlet ((tv :timeval))
    4950    (#_gettimeofday tv (%null-ptr))
    50     (+ (pref tv :timeval.tv_sec) unix-to-universal-time)))
     51    (+ (pref tv :timeval.tv_sec) unix-to-universal-time))
     52  #+windows-target
     53  (rlet ((ft #>FILETIME))
     54    (#_GetSystemTimeAsFileTime ft)
     55    (windows-filetime-to-universal-time ft)))
     56
    5157
    5258;;; This should stop using #_localtime_r: not all times can be represented
     
    194200  be any non-negative, non-complex number."
    195201  (when (minusp seconds) (report-bad-arg seconds '(real 0 *)))
     202  #-windows-target
    196203  (multiple-value-bind (secs nanos)
    197204      (nanoseconds seconds)
    198     (%nanosleep secs nanos)))
     205    (%nanosleep secs nanos))
     206  #+windows-target
     207  (let* ((millis (round (* seconds 1000))))
     208    (#_SleepEx
     209  )
    199210
    200211(defun get-internal-run-time ()
Note: See TracChangeset for help on using the changeset viewer.