]> gitweb.factorcode.org Git - factor.git/blob - extra/time/macosx/macosx.factor
classes.struct: moving to new/boa instead of <struct>/<struct-boa>
[factor.git] / extra / time / macosx / macosx.factor
1 ! Copyright (C) 2010 Doug Coleman.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: alien.data calendar calendar.unix classes.struct
4 io.files.info.unix.private kernel libc system time unix
5 unix.time ;
6 IN: time.macosx
7
8 M: macosx adjust-time-monotonic
9     timestamp>timeval
10     \ timeval new
11     [ adjtime io-error ] keep dup binary-zero? [
12         drop instant
13     ] [
14         timeval>duration since-1970 now time-
15     ] if ;