+++ /dev/null
-! Copyright (C) 2008 Slava Pestov.
-! See http://factorcode.org/license.txt for BSD license.
-USING: core-foundation tools.test kernel ;
-IN: core-foundation
-
-[ ] [ "Hello" <CFString> CFRelease ] unit-test
-[ "Hello" ] [ "Hello" <CFString> [ CF>string ] [ CFRelease ] bi ] unit-test
-[ "Hello\u003456" ] [ "Hello\u003456" <CFString> [ CF>string ] [ CFRelease ] bi ] unit-test
-[ "Hello\u013456" ] [ "Hello\u013456" <CFString> [ CF>string ] [ CFRelease ] bi ] unit-test
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax ;
+USING: alien.syntax system math kernel ;
IN: core-foundation.timers
TYPEDEF: void* CFRunLoopTimerRef
CFRunLoopTimerContext* context
) ;
+: <CFTimer> ( callback -- timer )
+ [ f millis 1000 /f 60 0 0 ] dip f CFRunLoopTimerCreate ;
+
FUNCTION: void CFRunLoopTimerInvalidate (
CFRunLoopTimerRef timer
-);
+) ;
FUNCTION: void CFRunLoopTimerSetNextFireDate (
CFRunLoopTimerRef timer,
--- /dev/null
+USING: io.unix.multiplexers.run-loop tools.test
+destructors ;
+IN: io.unix.multiplexers.run-loop.tests
+
+[ ] [ <run-loop-mx> dispose ] unit-test