+! Copyright (C) 2008 Doug Coleman.
+! See http://factorcode.org/license.txt for BSD license.
USING: alien alien.c-types alien.syntax arrays calendar
-kernel structs math unix unix.time namespaces system ;
+kernel math unix unix.time namespaces system ;
IN: calendar.unix
: make-timeval ( ms -- timeval )
USING: kernel alien.syntax alien.c-types math unix.types ;
IN: unix.time
+C-STRUCT: timeval
+ { "long" "sec" }
+ { "long" "usec" } ;
+
+C-STRUCT: timespec
+ { "time_t" "sec" }
+ { "long" "nsec" } ;
+
C-STRUCT: tm
{ "int" "sec" } ! Seconds: 0-59 (K&R says 0-61?)
{ "int" "min" } ! Minutes: 0-59