]> gitweb.factorcode.org Git - factor.git/commitdiff
Move nano-count>timestamp word to core-foundation.run-loop since its pretty specialized
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Fri, 20 Nov 2009 05:51:09 +0000 (23:51 -0600)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Fri, 20 Nov 2009 06:12:16 +0000 (00:12 -0600)
basis/calendar/calendar.factor
basis/core-foundation/run-loop/run-loop.factor

index 64eab3a55cac47ca31decd385b4583b17c2710c5..fd51feeed97e8e4fc64fe87196c54210c42ee25b 100644 (file)
@@ -397,9 +397,6 @@ M: duration time-
 : hence ( duration -- timestamp ) now swap time+ ;
 : ago ( duration -- timestamp ) now swap time- ;
 
-: nano-count>timestamp ( x -- timestamp )
-    nano-count - nanoseconds now time+ ;
-
 : zeller-congruence ( year month day -- n )
     #! Zeller Congruence
     #! http://web.textfiles.com/computers/formulas.txt
index 7a6115b4332c01c18ffc53a70ce92516a0a22120..2370dd45628dd47005409f8a897c8c6416033685 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors alien alien.c-types alien.syntax kernel math
 namespaces sequences destructors combinators threads heaps
-deques calendar core-foundation core-foundation.strings
+deques calendar system core-foundation core-foundation.strings
 core-foundation.file-descriptors core-foundation.timers
 core-foundation.time ;
 IN: core-foundation.run-loop
@@ -96,6 +96,9 @@ TUPLE: run-loop fds sources timers ;
 : ((reset-timer)) ( timer counter timestamp -- )
     nip >CFAbsoluteTime CFRunLoopTimerSetNextFireDate ;
 
+: nano-count>timestamp ( x -- timestamp )
+    nano-count - nanoseconds now time+ ;
+
 : (reset-timer) ( timer counter -- )
     yield {
         { [ dup 0 = ] [ now ((reset-timer)) ] }