1169695Skan/* Copyright (C) 2006 Free Software Foundation, Inc. 2169695Skan Contributed by Francois-Xavier Coudert <coudert@clipper.ens.fr> 3169695Skan 4169695Skan This file is part of the GNU OpenMP Library (libgomp). 5169695Skan 6169695Skan Libgomp is free software; you can redistribute it and/or modify it 7169695Skan under the terms of the GNU Lesser General Public License as published by 8169695Skan the Free Software Foundation; either version 2.1 of the License, or 9169695Skan (at your option) any later version. 10169695Skan 11169695Skan Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY 12169695Skan WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 13169695Skan FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for 14169695Skan more details. 15169695Skan 16169695Skan You should have received a copy of the GNU Lesser General Public License 17169695Skan along with libgomp; see the file COPYING.LIB. If not, write to the 18169695Skan Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, 19169695Skan MA 02110-1301, USA. */ 20169695Skan 21169695Skan/* As a special exception, if you link this library with other files, some 22169695Skan of which are compiled with GCC, to produce an executable, this library 23169695Skan does not by itself cause the resulting executable to be covered by the 24169695Skan GNU General Public License. This exception does not however invalidate 25169695Skan any other reasons why the executable file might be covered by the GNU 26169695Skan General Public License. */ 27169695Skan 28169695Skan/* This file contains timer routines for mingw32. */ 29169695Skan 30169695Skan#include "libgomp.h" 31169695Skan#include <unistd.h> 32169695Skan#include <sys/timeb.h> 33169695Skan 34169695Skandouble 35169695Skanomp_get_wtime (void) 36169695Skan{ 37169695Skan struct _timeb timebuf; 38169695Skan _ftime (&timebuf); 39169695Skan return (timebuf.time + (long)(timebuf.millitm) / 1e3); 40169695Skan} 41169695Skan 42169695Skandouble 43169695Skanomp_get_wtick (void) 44169695Skan{ 45169695Skan return 1e-3; 46169695Skan} 47169695Skan 48169695Skanialias (omp_get_wtime) 49169695Skanialias (omp_get_wtick) 50