calendar: make it deploy with threads disabled
parent
979e487fef
commit
779468f5a0
|
@ -2,7 +2,7 @@
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors arrays classes.tuple combinators
|
USING: accessors arrays classes.tuple combinators
|
||||||
combinators.short-circuit kernel locals math math.functions
|
combinators.short-circuit kernel locals math math.functions
|
||||||
math.order sequences summary system threads vocabs.loader ;
|
math.order sequences summary system vocabs.loader ;
|
||||||
IN: calendar
|
IN: calendar
|
||||||
|
|
||||||
HOOK: gmt-offset os ( -- hours minutes seconds )
|
HOOK: gmt-offset os ( -- hours minutes seconds )
|
||||||
|
@ -540,10 +540,9 @@ M: integer end-of-year 12 31 <date> ;
|
||||||
: unix-time>timestamp ( seconds -- timestamp )
|
: unix-time>timestamp ( seconds -- timestamp )
|
||||||
seconds unix-1970 time+ ;
|
seconds unix-1970 time+ ;
|
||||||
|
|
||||||
M: duration sleep
|
|
||||||
duration>nanoseconds >integer nano-count + sleep-until ;
|
|
||||||
|
|
||||||
{
|
{
|
||||||
{ [ os unix? ] [ "calendar.unix" ] }
|
{ [ os unix? ] [ "calendar.unix" ] }
|
||||||
{ [ os windows? ] [ "calendar.windows" ] }
|
{ [ os windows? ] [ "calendar.windows" ] }
|
||||||
} cond require
|
} cond require
|
||||||
|
|
||||||
|
{ "threads" "calendar" } "calendar.threads" require-when
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
! Copyright (C) 2011 Slava Pestov.
|
||||||
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
|
USING: calendar math system threads ;
|
||||||
|
IN: calendar.threads
|
||||||
|
|
||||||
|
M: duration sleep
|
||||||
|
duration>nanoseconds >integer nano-count + sleep-until ;
|
Loading…
Reference in New Issue