]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/time/time.factor
Implement set-time on Windows
[factor.git] / extra / time / time.factor
index 45ba3bc14165fc99ce101bf748799f2080209c61..61a4d7415e9ad0572eca1440c5da3e5c1cde8100 100644 (file)
@@ -1,7 +1,14 @@
 ! Copyright (C) 2010 Doug Coleman.
 ! See http://factorcode.org/license.txt for BSD license.
-USING: system ;
+USING: combinators kernel system vocabs.loader ;
 IN: time
 
 HOOK: set-time os ( timestamp -- )
 HOOK: adjust-time-monotonic os ( timestamp -- seconds )
+
+os {
+    { [ dup macosx? ] [ drop "time.macosx" require ] }
+    { [ dup windows? ] [ drop "time.windows" require ] }
+    { [ dup unix? ] [ drop "time.unix" require ] }
+    [ drop ]
+} cond