/***************************************************************************
                           platform.cpp  -  description
                             -------------------
    begin                : Thu Jun 5 2003
    copyright            : (C) 2003 by Mathias Küster
    email                : mathen@users.berlios.de
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#include "platform.h"

#include "../dcos.h"

#ifdef WIN32

extern "C" {
/*
 * gettimeofday() - QpThread archive
 */
int gettimeofday(struct timeval *tp, void * /*pv*/ )
{
	struct _timeb currSysTime;

	/* get current system time */
	_ftime(&currSysTime);

	tp->tv_sec = currSysTime.time;
	tp->tv_usec = currSysTime.millitm * 1000;

	return 0;
}

}

#endif
