-extern int gettimeofday(struct timeval *tv, struct timezone *tz);
-function psi\gettimeofday(array &$tv = NULL, array &$tz = NULL) : int {
- let tv = calloc(1, struct timeval);
- let tz = calloc(1, struct timezone);
- return to_int(gettimeofday);
- set $tv = to_array(*tv,
+// extern int gettimeofday(struct timeval *tp, struct timezone *tz);
+function psi\gettimeofday(array &$tv = NULL) : int {
+ let tp = calloc(1, sizeof(struct timeval));
+ let tz = NULL;
+ return gettimeofday(tp, tz) as to_int(gettimeofday);
+ set $tv = to_array(*tp,