factor/basis/calendar/model/model.factor

22 lines
492 B
Factor
Raw Normal View History

! Copyright (C) 2008, 2010 Slava Pestov
2008-01-28 19:13:35 -05:00
! 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
time-thread
] "calendar.model" add-startup-hook