From: Russ Tyndall Date: Thu, 8 Feb 2018 16:52:51 +0000 (-0500) Subject: use multi-value-bind instead of two calls to the get the same data X-Git-Url: http://git.kpe.io/?p=clsql.git;a=commitdiff_plain;h=3ab5ff5c8b7f6a8fc37f5870b9518a0862f2e611 use multi-value-bind instead of two calls to the get the same data re ADWolf:#1408 --- diff --git a/db-postgresql-socket3/sql.lisp b/db-postgresql-socket3/sql.lisp index 8edacf1..12929c6 100644 --- a/db-postgresql-socket3/sql.lisp +++ b/db-postgresql-socket3/sql.lisp @@ -37,10 +37,9 @@ (setf (clsql-sys::time-is-utc? dt) t) dt) (dt-fn (useconds-since-2000) - (let* ((sec (floor useconds-since-2000 1000000)) - (usec (mod useconds-since-2000 1000000)) - (time (clsql:make-time :year 2000 :second sec :usec usec))) - time))) + (multiple-value-bind (sec usec) + (floor useconds-since-2000 1000000) + (clsql:make-time :year 2000 :second sec :usec usec)))) (cl-postgres:set-sql-datetime-readers :table *sqlreader* :timestamp #'dt-fn