]> gitweb.factorcode.org Git - factor.git/commitdiff
Move time-related words to core-foundation.time to remove number tower dependency...
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Sat, 13 Dec 2008 10:57:37 +0000 (04:57 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Sat, 13 Dec 2008 10:57:37 +0000 (04:57 -0600)
basis/core-foundation/core-foundation.factor
basis/core-foundation/fsevents/fsevents.factor
basis/core-foundation/run-loop/run-loop.factor
basis/core-foundation/time/time.factor [new file with mode: 0644]
basis/core-foundation/timers/timers.factor

index 51173aff211019b4c5009c3085930bf7b97f10c5..6b7d81c86209208dd50991286eca42f475ba5477 100644 (file)
@@ -1,6 +1,6 @@
 ! 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
@@ -14,8 +14,6 @@ TYPEDEF: int SInt32
 TYPEDEF: uint UInt32
 TYPEDEF: ulong CFTypeID
 TYPEDEF: UInt32 CFOptionFlags
-TYPEDEF: double CFTimeInterval
-TYPEDEF: double CFAbsoluteTime
 
 FUNCTION: CFTypeRef CFRetain ( CFTypeRef cf ) ;
 
@@ -30,10 +28,3 @@ M: CFRelease-destructor dispose* alien>> CFRelease ;
 
 : |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
index 7ed040b45538c05e7aee75270ce6db51b7439019..b0c299a83178ec477413cf7a23c496d38d02b173 100644 (file)
@@ -5,7 +5,8 @@ math sequences namespaces make assocs init accessors
 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
index 5f2ff7bd53261cc703faee350195799bba92bcfe..8b2106685a1f110912cfaf1728a3d5a28b5e8422 100644 (file)
@@ -3,7 +3,8 @@
 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
diff --git a/basis/core-foundation/time/time.factor b/basis/core-foundation/time/time.factor
new file mode 100644 (file)
index 0000000..15ad7bb
--- /dev/null
@@ -0,0 +1,14 @@
+! 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
index 0acd92ced1c93cda046ef39820ee2640691e8741..51ee98259231e48bc4fc35b63fbfb1925f021087 100644 (file)
@@ -1,6 +1,7 @@
 ! 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