sl@0: /* 
sl@0:  * gettod.c --
sl@0:  *
sl@0:  *	This file provides the gettimeofday function on systems
sl@0:  *	that only have the System V ftime function.
sl@0:  *
sl@0:  * Copyright (c) 1995 Sun Microsystems, Inc.
sl@0:  *
sl@0:  * See the file "license.terms" for information on usage and redistribution
sl@0:  * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
sl@0:  *
sl@0:  * RCS: @(#) $Id: gettod.c,v 1.2 1998/09/14 18:39:44 stanton Exp $
sl@0:  */
sl@0: 
sl@0: #include "tcl.h"
sl@0: #include "tclPort.h"
sl@0: #include <sys/timeb.h>
sl@0: 
sl@0: #undef timezone
sl@0: 
sl@0: int
sl@0: gettimeofday(tp, tz)
sl@0: struct timeval *tp;
sl@0: struct timezone *tz;
sl@0: {
sl@0:     struct timeb t;
sl@0:     ftime(&t);
sl@0:     tp->tv_sec = t.time;
sl@0:     tp->tv_usec = t. millitm * 1000;
sl@0:     return 0;
sl@0: }
sl@0: