factor/extra/calendar/model/model.factor

16 lines
396 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-01-29 03:02:21 -05:00
USING: calendar namespaces models threads init ;
2008-01-28 19:13:35 -05:00
IN: calendar.model
SYMBOL: time
: (time-thread) ( -- )
now time get set-model
1000 sleep (time-thread) ;
: time-thread ( -- ) [ (time-thread) ] in-thread ;
f <model> time set-global
2008-01-29 03:02:21 -05:00
[ time-thread ] "calendar.model" add-init-hook