LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
PortableGetTimeOfDay.h
Go to the documentation of this file.
1// Copyright 2002-2013 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6#ifndef PORTABLEGETTIMEOFDAY_DEFINED
7#define PORTABLEGETTIMEOFDAY_DEFINED 1
8
9#include "common/LimaCommon.h"
10
11#if defined(__WIN32__) || defined(WIN32)
12
13#include <stdlib.h> // for timeval on Cygwin
14#include <time.h>
15#include <winsock2.h>
16
17// Defined in winsock.h
18//struct timeval {
19// long tv_sec; /* seconds since Jan. 1, 1970 */
20// long tv_usec; /* and microseconds */
21//};
22
23struct timezone {
24int tz_minuteswest; /* of Greenwich */
25int tz_dsttime; /* type of dst correction to apply */
26};
27
28LIMA_TIME_EXPORT void gettimeofday(struct timeval *tv, struct timezone *tz);
29
30#else
31
32#include <sys/time.h>
33
34#endif
35
36#endif
#define LIMA_TIME_EXPORT
Definition LimaCommon.h:136