diff --git a/basis/calendar/unix/unix.factor b/basis/calendar/unix/unix.factor index e811abcab8..4a1b7d49ef 100644 --- a/basis/calendar/unix/unix.factor +++ b/basis/calendar/unix/unix.factor @@ -1,21 +1,13 @@ USING: alien alien.c-types alien.syntax arrays calendar -kernel structs math unix.time namespaces system ; +kernel structs math unix unix.time namespaces system ; IN: calendar.unix -C-STRUCT: timeval - { "long" "sec" } - { "long" "usec" } ; - : make-timeval ( ms -- timeval ) 1000 /mod 1000 * "timeval" [ set-timeval-usec ] keep [ set-timeval-sec ] keep ; -C-STRUCT: timespec - { "time_t" "sec" } - { "long" "nsec" } ; - : make-timespec ( ms -- timespec ) 1000 /mod 1000000 * "timespec" diff --git a/basis/unix/unix.factor b/basis/unix/unix.factor index 4c572a6be0..8ccc14f44d 100644 --- a/basis/unix/unix.factor +++ b/basis/unix/unix.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2005, 2007 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: alien alien.c-types alien.syntax kernel libc structs +USING: alien alien.c-types alien.syntax kernel libc sequences continuations byte-arrays strings math namespaces system combinators vocabs.loader qualified accessors stack-checker macros locals generalizations unix.types @@ -29,6 +29,15 @@ C-STRUCT: group { "int" "gr_gid" } { "char**" "gr_mem" } ; +C-STRUCT: timeval + { "long" "sec" } + { "long" "usec" } ; + +C-STRUCT: timespec + { "time_t" "sec" } + { "long" "nsec" } ; + + LIBRARY: factor FUNCTION: void clear_err_no ( ) ;