diff -r 000000000000 -r bde4ae8d615e os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/compat/gettod.c --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/os/persistentdata/persistentstorage/sqlite3api/TEST/TCL/tcldistribution/compat/gettod.c Fri Jun 15 03:10:57 2012 +0200 @@ -0,0 +1,32 @@ +/* + * gettod.c -- + * + * This file provides the gettimeofday function on systems + * that only have the System V ftime function. + * + * Copyright (c) 1995 Sun Microsystems, Inc. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * RCS: @(#) $Id: gettod.c,v 1.2 1998/09/14 18:39:44 stanton Exp $ + */ + +#include "tcl.h" +#include "tclPort.h" +#include + +#undef timezone + +int +gettimeofday(tp, tz) +struct timeval *tp; +struct timezone *tz; +{ + struct timeb t; + ftime(&t); + tp->tv_sec = t.time; + tp->tv_usec = t. millitm * 1000; + return 0; +} +