X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=psi.d%2Ftime.psi;fp=psi.d%2Ftime.psi;h=e01bd1be6c037a5bded943b5e3bb1cc562dfe7da;hp=1281c51d988867b3eb624fdb3266e83ce4ae2423;hb=b4508f6b917660970f887894a6aaed6c220a2c72;hpb=3137da963d298c73ce3bc858874fdfc87fa941b7 diff --git a/psi.d/time.psi b/psi.d/time.psi index 1281c51..e01bd1b 100644 --- a/psi.d/time.psi +++ b/psi.d/time.psi @@ -1,4 +1,3 @@ -extern time_t time(time_t *t); function psi\time() : int { let t = NULL; return to_int(time); @@ -9,11 +8,11 @@ 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, - to_int(tv_sec), + set $tv = to_array(*tv, + to_int(tv_sec), to_int(tv_usec)); - set $tz = to_array(*tz, - to_int(tz_minuteswest), + set $tz = to_array(*tz, + to_int(tz_minuteswest), to_int(tz_dsttime)); }