/* This file is part of the YAZ toolkit. * Copyright (C) Index Data * See the file LICENSE for details. */ /** * \file gettimeofday.c * \brief Implements wrapper for gettimeofday * */ #if HAVE_CONFIG_H #include #endif #include #include #include #ifdef WIN32 #include #include #endif #if HAVE_SYS_TIME_H #include #endif #include int yaz_gettimeofday(struct timeval *tval) { #ifdef WIN32 struct _timeb timeb; _ftime(&timeb); tval->tv_sec = timeb.time; tval->tv_usec = timeb.millitm * 1000; return 0; #else return gettimeofday(tval, 0); #endif } /* * Local variables: * c-basic-offset: 4 * c-file-style: "Stroustrup" * indent-tabs-mode: nil * End: * vim: shiftwidth=4 tabstop=8 expandtab */