From 6914e69d69099565e5af356ee6487259df121934 Mon Sep 17 00:00:00 2001 From: Slava Pestov Date: Sun, 18 Jul 2010 16:27:02 -0400 Subject: [PATCH] calendar.unix: rename timespec>seconds to timespec>duration to be consistent with timeval>duration --- basis/calendar/unix/unix.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basis/calendar/unix/unix.factor b/basis/calendar/unix/unix.factor index a1e83cc1c1..9f7d165925 100644 --- a/basis/calendar/unix/unix.factor +++ b/basis/calendar/unix/unix.factor @@ -11,14 +11,14 @@ IN: calendar.unix : timeval>unix-time ( timeval -- timestamp ) timeval>duration since-1970 ; -: timespec>seconds ( timespec -- seconds ) +: timespec>duration ( timespec -- seconds ) [ sec>> seconds ] [ nsec>> nanoseconds ] bi time+ ; : timespec>nanoseconds ( timespec -- seconds ) [ sec>> 1000000000 * ] [ nsec>> ] bi + ; : timespec>unix-time ( timespec -- timestamp ) - timespec>seconds since-1970 ; + timespec>duration since-1970 ; : get-time ( -- alien ) f time localtime ;