factor/basis/calendar/model/model.factor

20 lines
473 B
Factor
Raw Normal View History

2008-01-28 19:13:35 -05:00
! Copyright (C) 2008 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
2008-02-18 10:08:59 -05:00
USING: calendar namespaces models threads kernel init ;
2008-01-28 19:13:35 -05:00
IN: calendar.model
SYMBOL: time
: (time-thread) ( -- )
now time get set-model
1 seconds sleep (time-thread) ;
2008-01-28 19:13:35 -05:00
2008-02-18 06:07:40 -05:00
: time-thread ( -- )
2008-06-11 21:27:31 -04:00
[
init-namespaces
(time-thread)
] "Time model update" spawn drop ;
2008-01-28 19:13:35 -05:00
f <model> time set-global
2008-01-29 03:02:21 -05:00
[ time-thread ] "calendar.model" add-init-hook