OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tcl/] [compat/] [gettod.c] - Diff between revs 578 and 1765

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

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

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.