1 1.1.1.12 mrg /* Copyright (C) 2006-2024 Free Software Foundation, Inc. 2 1.1 mrg Contributed by Francois-Xavier Coudert <coudert (at) clipper.ens.fr> 3 1.1 mrg 4 1.1.1.3 mrg This file is part of the GNU Offloading and Multi Processing Library 5 1.1.1.3 mrg (libgomp). 6 1.1 mrg 7 1.1 mrg Libgomp is free software; you can redistribute it and/or modify it 8 1.1 mrg under the terms of the GNU General Public License as published by 9 1.1 mrg the Free Software Foundation; either version 3, or (at your option) 10 1.1 mrg any later version. 11 1.1 mrg 12 1.1 mrg Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY 13 1.1 mrg WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 14 1.1 mrg FOR A PARTICULAR PURPOSE. See the GNU General Public License for 15 1.1 mrg more details. 16 1.1 mrg 17 1.1 mrg Under Section 7 of GPL version 3, you are granted additional 18 1.1 mrg permissions described in the GCC Runtime Library Exception, version 19 1.1 mrg 3.1, as published by the Free Software Foundation. 20 1.1 mrg 21 1.1 mrg You should have received a copy of the GNU General Public License and 22 1.1 mrg a copy of the GCC Runtime Library Exception along with this program; 23 1.1 mrg see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 24 1.1 mrg <http://www.gnu.org/licenses/>. */ 25 1.1 mrg 26 1.1 mrg /* This file contains timer routines for mingw32. */ 27 1.1 mrg 28 1.1 mrg #include "libgomp.h" 29 1.1 mrg #include <unistd.h> 30 1.1 mrg #include <sys/timeb.h> 31 1.1 mrg 32 1.1 mrg double 33 1.1 mrg omp_get_wtime (void) 34 1.1 mrg { 35 1.1 mrg struct _timeb timebuf; 36 1.1 mrg _ftime (&timebuf); 37 1.1 mrg return (timebuf.time + (long)(timebuf.millitm) / 1e3); 38 1.1 mrg } 39 1.1 mrg 40 1.1 mrg double 41 1.1 mrg omp_get_wtick (void) 42 1.1 mrg { 43 1.1 mrg return 1e-3; 44 1.1 mrg } 45 1.1 mrg 46 1.1 mrg ialias (omp_get_wtime) 47 1.1 mrg ialias (omp_get_wtick) 48