]> gitweb.factorcode.org Git - factor.git/blob - basis/core-foundation/time/time.factor
add USING:s and rearrange definitions so macosx can compile without parsing c-type...
[factor.git] / basis / core-foundation / time / time.factor
1 ! Copyright (C) 2008 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: calendar alien.c-types alien.syntax ;
4 IN: core-foundation.time
5
6 TYPEDEF: double CFTimeInterval
7 TYPEDEF: double CFAbsoluteTime
8
9 : >CFTimeInterval ( duration -- interval )
10     duration>seconds ; inline
11
12 : >CFAbsoluteTime ( timestamp -- time )
13     T{ timestamp { year 2001 } { month 1 } { day 1 } } time-
14     duration>seconds ; inline