ushalow
[clean-tests.git] / old / stampedShare / test.icl
1 module test
2
3 <<<<<<< HEAD
4 import iTasks.Extensions.DateTime
5 import System.Time
6 import iTasks
7
8 sh = sharedStore "bork1" ({DateTime|year=0,mon=0,day=0,hour=0,min=0,sec=0}, 42)
9 sh` = sharedStore "bork2" ({Timespec|tv_sec=0,tv_nsec=0}, 42)
10
11 Start w = doTasks t w
12
13 t = viewSharedInformation [] sh
14 -&&- updateSharedInformation [] (dateTimeStampedShare sh)
15 -&&- viewSharedInformation [] sh`
16 -&&- updateSharedInformation [] (timespecStampedShare sh`)
17 =======
18 import iTasks.Internal.IWorld
19 import System.Time
20 import iTasks
21
22 sh = sharedStore "bork2" ({Timespec|tv_sec=0,tv_nsec=0}, 42)
23
24 Start w = doTasks t w
25
26 t = viewSharedInformation [] sh
27 -&&- updateSharedInformation [] (
28 sdsTranslate "" (\p->((), p))
29 (sdsStamp sh ticker (\x y->(x, y))))
30
31 // This gives you 100% cpu because you get updates very fast
32 //t = viewSharedInformation [] ticker
33
34 ticker = sdsFocus {start={tv_sec=0,tv_nsec=0},interval={Timespec|tv_sec=0,tv_nsec=1000000}} iworldTimespec
35 >>>>>>> 49f7dcc4c088dc816398a0c7854d75d7c2628f15