// extern char *asctime(struct tm *tm);
function psi\asctime(array $tm = NULL) : string {
- let tm = arrval($tm);
+ let tm = &arrval($tm);
return to_string(asctime);
}
// extern char *asctime_r(struct tm *tm, char *buf);
function psi\asctime_r(array $tm = NULL) : string {
- let tm = arrval($tm);
+ let tm = &arrval($tm);
let buf = calloc(32, psi\SIZEOF_CHAR);
return to_string(asctime_r);
}
// extern int nanosleep(struct timespec *rqts, struct timespec *rmts);
function psi\nanosleep(array $rq = NULL, array &$rm = NULL) : int {
- let rqts = arrval($rq);
+ let rqts = &arrval($rq);
let rmts = calloc(1, psi\SIZEOF_STRUCT_TIMESPEC);
return to_int(nanosleep);
set $rm = to_array(*rmts,
function psi\times(array &$tms = NULL) : int {
let buf = calloc(1, psi\SIZEOF_STRUCT_TMS);
return to_int(times);
- set $tms = to_array(buf,
+ set $tms = to_array(*buf,
to_int(tms_utime),
to_int(tms_stime),
to_int(tms_cutime),