mirror of https://github.com/Cisco-Talos/clamav
parent
b8f3f028b2
commit
2d777de59d
@ -0,0 +1,36 @@ |
||||
/*
|
||||
* Copyright (C) 2009 Sourcefire, Inc. |
||||
* |
||||
* Authors: aCaB <acab@clamav.net> |
||||
* |
||||
* This program is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License version 2 as |
||||
* published by the Free Software Foundation. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
||||
* MA 02110-1301, USA. |
||||
*/ |
||||
|
||||
#if HAVE_CONFIG_H |
||||
#include "clamav-config.h" |
||||
#endif |
||||
|
||||
#include <sys/types.h> |
||||
#include <sys/timeb.h> |
||||
#include "gettimeofday.h" |
||||
|
||||
int gettimeofday(struct timeval *tv, struct timezone *tz) { |
||||
struct _timeb t; |
||||
|
||||
_ftime_s(&t); |
||||
tv->tv_sec = t.time; |
||||
tv->tv_usec = t.millitm * 1000; |
||||
return 0; |
||||
} |
@ -0,0 +1,26 @@ |
||||
/*
|
||||
* Copyright (C) 2009 Sourcefire, Inc. |
||||
* |
||||
* Authors: aCaB <acab@clamav.net> |
||||
* |
||||
* This program is free software; you can redistribute it and/or modify |
||||
* it under the terms of the GNU General Public License version 2 as |
||||
* published by the Free Software Foundation. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU General Public License |
||||
* along with this program; if not, write to the Free Software |
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, |
||||
* MA 02110-1301, USA. |
||||
*/ |
||||
|
||||
#ifndef __GETLOCALTIME_H |
||||
#define __GETLOCALTIME_H |
||||
|
||||
int gettimeofday(struct timeval *tv, struct timezone *tz); |
||||
|
||||
#endif /* __GETLOCALTIME_H */ |
Loading…
Reference in new issue