[Prev][Next][Index][Thread]

# Re: time() built-in

- Date: Sat, 22 Jun 1996 12:24:36 PDT
- From:

    static package
    bf_us_time(Var arglist, Byte next, void *vdata, Objid progr)
    {
        Var r;
        struct timevel *tv = (struct timeval *)alloc_data(sizeof(struct timeval));
        struct timezone *tz = 0;

        gettimeofday(tv, tz);

        r = new_float(((double)tv->tv_sec) + ((double)tv->tv_usec / 1000000));

        free_data(tv);
        free_var(arglist);
        return make_var_pack(r);
    }

    and in register_extensions...
         register_function("us_time", 0, 0, bf_us_time);

    In answer to your second question, send mail to MOO-Cows-Request@xerox.com with the single line message "subscribe MOO-Cows".

    ---
       Brian Buchanan    sysop@calbbs.com    brian@wasteland.calbbs.com
    -= ArchWizard of Digital Wasteland MOO (wasteland.calbbs.com 8888) =-

Follow-Ups:

- Re: time() built-in

- From: Martian <wsmyth@wichita.fn.net>

- Re: time() built-in

- From: hpa@trantor.zytor.com (H. Peter Anvin)

- Prev: time() built-in
- Next: Re: time() built-in
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index