]> gitweb.factorcode.org Git - factor.git/blob - basis/calendar/model/model.factor
core, basis, extra: Remove DOS line endings from files.
[factor.git] / basis / calendar / model / model.factor
1 ! Copyright (C) 2008, 2010 Slava Pestov
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: calendar namespaces models threads kernel init ;
4 IN: calendar.model
5
6 SYMBOL: time
7
8 : (time-thread) ( -- )
9     now time get set-model
10     1 seconds sleep (time-thread) ;
11
12 : time-thread ( -- )
13     [
14         init-namespaces
15         (time-thread)
16     ] "Time model update" spawn drop ;
17
18 [
19     f <model> time set-global
20     time-thread
21 ] "calendar.model" add-startup-hook