calendar.unix: rename timespec>seconds to timespec>duration to be consistent with timeval>duration
parent
35e5c572ce
commit
6914e69d69
|
@ -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 <time_t> localtime ;
|
||||
|
|
Loading…
Reference in New Issue