From 4734b62dd8d1086a89c5df09cab91b0fab6a6c10 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 6 Oct 2008 18:03:56 -0500 Subject: [PATCH] things in the wrong place still, probably will have some using errors now.. --- basis/calendar/calendar.factor | 8 -------- basis/calendar/unix/unix.factor | 8 ++++++++ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/basis/calendar/calendar.factor b/basis/calendar/calendar.factor index 719f0f6e9f..d5824768f4 100644 --- a/basis/calendar/calendar.factor +++ b/basis/calendar/calendar.factor @@ -404,14 +404,6 @@ PRIVATE> : since-1970 ( time -- timestamp ) unix-1970 time+ >local-time ; -: timeval>unix-time ( timeval -- timestamp ) - [ timeval-sec seconds ] [ timeval-usec microseconds ] bi - time+ since-1970 ; - -: timespec>unix-time ( timeval -- timestamp ) - [ timespec-sec seconds ] [ timespec-nsec nanoseconds ] bi - time+ since-1970 ; - M: timestamp sleep-until timestamp>millis sleep-until ; M: duration sleep hence sleep-until ; diff --git a/basis/calendar/unix/unix.factor b/basis/calendar/unix/unix.factor index 4a1b7d49ef..679cc69fad 100644 --- a/basis/calendar/unix/unix.factor +++ b/basis/calendar/unix/unix.factor @@ -14,6 +14,14 @@ IN: calendar.unix [ set-timespec-nsec ] keep [ set-timespec-sec ] keep ; +: timeval>unix-time ( timeval -- timestamp ) + [ timeval-sec seconds ] [ timeval-usec microseconds ] bi + time+ since-1970 ; + +: timespec>unix-time ( timeval -- timestamp ) + [ timespec-sec seconds ] [ timespec-nsec nanoseconds ] bi + time+ since-1970 ; + : get-time ( -- alien ) f time localtime ;