;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Feb 2002
;;;;
-;;;; $Id: gettime.cl,v 1.6 2002/03/14 21:03:12 kevin Exp $
+;;;; $Id: gettime.cl,v 1.7 2002/03/23 16:32:39 kevin Exp $
;;;;
;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
(defun gettime ()
"Returns the local time"
- (let* ((time (uffi:allocate-foreign-object time-t)))
- (declare (type time-t time))
+ (uffi:with-foreign-object (time 'time-t)
+;; (declare (type time-t time))
(c-time time)
(let ((tm-ptr (the tm-pointer (c-localtime time))))
(declare (type tm-pointer tm-ptr))
(uffi:get-slot-value tm-ptr 'tm 'min)
(uffi:get-slot-value tm-ptr 'tm 'sec)
)))
- (uffi:free-foreign-object time)
- time-string))
- ))
+ time-string))))