-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtime.af
More file actions
74 lines (59 loc) · 2.51 KB
/
Copy pathtime.af
File metadata and controls
74 lines (59 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
use' ./lang.af
\ ## Libc time
\
\ MacOS 15.3 (24D60), <time.h>.
\
\ Translated from C definitions and only partially tested.
S64 let: Clock \ clock_t
S64 let: Time \ time_t
\ `struct timespec`. Used by reference.
struct: Timespec
S64 1 field: Timespec_sec
S64 1 field: Timespec_nsec
end
\ `struct tm`. Used by reference.
struct: Date
S32 1 field: Date_sec \ seconds after the minute [0-60]
S32 1 field: Date_min \ minutes after the hour [0-59]
S32 1 field: Date_hour \ hours since midnight [0-23]
S32 1 field: Date_mday \ day of the month [1-31]
S32 1 field: Date_mon \ months since January [0-11]
S32 1 field: Date_year \ years since 1900
S32 1 field: Date_wday \ days since Sunday [0-6]
S32 1 field: Date_yday \ days since January 1 [0-365]
S32 1 field: Date_isdst \ Daylight Savings Time flag
S64 1 field: Date_gmtoff \ offset from UTC in seconds
Cstr 1 field: Date_zone \ timezone abbreviation
end
1000000 let: CLOCKS_PER_SEC
0 let: CLOCK_REALTIME
6 let: CLOCK_MONOTONIC
fun: getdate_err { -- err } extern_adr' getdate_err @ end
0 1 extern: clock ( -- clock|-1 )
1 1 extern: time ( time_adr -- time|-1 )
1 1 extern: getdate ( str -- date )
4 1 extern: strftime ( buf size fmt date -- len )
4 1 extern: strptime ( buf fmt date -- str )
1 1 extern: asctime ( date -- str )
2 1 extern: asctime_r ( date buf -- str )
1 1 extern: ctime ( time_adr -- str )
2 1 extern: ctime_r ( time_adr buf -- str )
1 1 extern: gmtime ( time_adr -- date )
2 1 extern: gmtime_r ( time_adr date -- date )
1 1 extern: localtime ( time_adr -- date )
2 1 extern: localtime_r ( time_adr date -- date )
1 1 extern: mktime ( date -- time|-1 )
1 1 extern: timegm ( date -- time|-1 )
1 1 extern: timelocal ( date -- time|-1 )
1 1 extern: posix2time ( time -- time )
1 1 extern: time2posix ( time -- time )
0 0 extern: tzset ( -- )
0 0 extern: tzsetwall ( -- )
2 1 extern: timespec_get ( timespec base -- base :Cint )
2 1 extern: clock_gettime ( clock_id timespec -- 0|-1 :Cint )
2 1 extern: clock_settime ( clock_id timespec -- 0|-1 :Cint )
2 1 extern: clock_getres ( clock_id timespec -- 0|-1 :Cint )
1 1 extern: clock_gettime_nsec_np ( clock_id -- val )
1 1 extern: sleep ( secs -- left )
1 1 extern: usleep ( usec -- 0|-1 :Cint )
2 1 extern: nanosleep ( timespec timespec -- 0|-1 :Cint )