! Copyright (C) 2006, 2008 Slava Pestov
! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax destructors accessors kernel calendar ;
+USING: alien.syntax destructors accessors kernel ;
IN: core-foundation
TYPEDEF: void* CFTypeRef
TYPEDEF: uint UInt32
TYPEDEF: ulong CFTypeID
TYPEDEF: UInt32 CFOptionFlags
-TYPEDEF: double CFTimeInterval
-TYPEDEF: double CFAbsoluteTime
FUNCTION: CFTypeRef CFRetain ( CFTypeRef cf ) ;
: |CFRelease ( alien -- alien )
dup f CFRelease-destructor boa |dispose drop ; inline
-
-: >CFTimeInterval ( duration -- interval )
- duration>seconds ; inline
-
-: >CFAbsoluteTime ( timestamp -- time )
- T{ timestamp { year 2001 } { month 1 } { day 1 } } time-
- duration>seconds ; inline
continuations combinators io.encodings.utf8 destructors locals
arrays specialized-arrays.direct.alien
specialized-arrays.direct.int specialized-arrays.direct.longlong
-core-foundation core-foundation.run-loop core-foundation.strings ;
+core-foundation core-foundation.run-loop core-foundation.strings
+core-foundation.time ;
IN: core-foundation.fsevents
: kFSEventStreamCreateFlagUseCFTypes 2 ; inline
USING: accessors alien alien.syntax kernel math namespaces
sequences destructors combinators threads heaps deques calendar
core-foundation core-foundation.strings
-core-foundation.file-descriptors core-foundation.timers ;
+core-foundation.file-descriptors core-foundation.timers
+core-foundation.time ;
IN: core-foundation.run-loop
: kCFRunLoopRunFinished 1 ; inline
--- /dev/null
+! Copyright (C) 2008 Slava Pestov.
+! See http://factorcode.org/license.txt for BSD license.
+USING: calendar alien.syntax ;
+IN: core-foundation.time
+
+TYPEDEF: double CFTimeInterval
+TYPEDEF: double CFAbsoluteTime
+
+: >CFTimeInterval ( duration -- interval )
+ duration>seconds ; inline
+
+: >CFAbsoluteTime ( timestamp -- time )
+ T{ timestamp { year 2001 } { month 1 } { day 1 } } time-
+ duration>seconds ; inline
! Copyright (C) 2008 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
-USING: alien.syntax system math kernel core-foundation calendar ;
+USING: alien.syntax system math kernel calendar core-foundation
+core-foundation.time ;
IN: core-foundation.timers
TYPEDEF: void* CFRunLoopTimerRef