os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/compat/gettod.c
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/compat/gettod.c	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,32 @@
     1.4 +/* 
     1.5 + * gettod.c --
     1.6 + *
     1.7 + *	This file provides the gettimeofday function on systems
     1.8 + *	that only have the System V ftime function.
     1.9 + *
    1.10 + * Copyright (c) 1995 Sun Microsystems, Inc.
    1.11 + *
    1.12 + * See the file "license.terms" for information on usage and redistribution
    1.13 + * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
    1.14 + *
    1.15 + * RCS: @(#) $Id: gettod.c,v 1.2 1998/09/14 18:39:44 stanton Exp $
    1.16 + */
    1.17 +
    1.18 +#include "tcl.h"
    1.19 +#include "tclPort.h"
    1.20 +#include <sys/timeb.h>
    1.21 +
    1.22 +#undef timezone
    1.23 +
    1.24 +int
    1.25 +gettimeofday(tp, tz)
    1.26 +struct timeval *tp;
    1.27 +struct timezone *tz;
    1.28 +{
    1.29 +    struct timeb t;
    1.30 +    ftime(&t);
    1.31 +    tp->tv_sec = t.time;
    1.32 +    tp->tv_usec = t. millitm * 1000;
    1.33 +    return 0;
    1.34 +}
    1.35 +