From 3ab5ff5c8b7f6a8fc37f5870b9518a0862f2e611 Mon Sep 17 00:00:00 2001 From: Russ Tyndall Date: Thu, 8 Feb 2018 11:52:51 -0500 Subject: [PATCH] use multi-value-bind instead of two calls to the get the same data re ADWolf:#1408 --- db-postgresql-socket3/sql.lisp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) 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 -- 2.34.1