Code Search for Developers
 
 
  

gettod.c from Gdb at Krugle


Show gettod.c syntax highlighted

/* 
 * 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 <sys/timeb.h>

#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;
}





See more files for this project here

Gdb

GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it executes -- or what another program was doing at the moment it crashed.

Project homepage: http://sources.redhat.com/gdb/
Programming language(s): Assembly,C,C++,Expect
License: other

  README
  dirent.h
  dirent2.h
  dlfcn.h
  fixstrtod.c
  float.h
  gettod.c
  license.terms
  limits.h
  memcmp.c
  opendir.c
  stdlib.h
  strftime.c
  string.h
  strncasecmp.c
  strstr.c
  strtod.c
  strtol.c
  strtoll.c
  strtoul.c
  strtoull.c
  tclErrno.h
  tmpnam.c
  unistd.h
  waitpid.c