/extra/time/time.factor

http://github.com/abeaumont/factor · Factor · 14 lines · 10 code · 2 blank · 2 comment · 1 complexity · 01da54209f45f57018be5e24b92f6ead MD5 · raw file

  1. ! Copyright (C) 2010 Doug Coleman.
  2. ! See http://factorcode.org/license.txt for BSD license.
  3. USING: combinators kernel system vocabs ;
  4. IN: time
  5. HOOK: set-time os ( timestamp -- )
  6. HOOK: adjust-time-monotonic os ( timestamp -- seconds )
  7. os {
  8. { [ dup macosx? ] [ drop "time.macosx" require ] }
  9. { [ dup windows? ] [ drop "time.windows" require ] }
  10. { [ dup unix? ] [ drop "time.unix" require ] }
  11. [ drop ]
  12. } cond