LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
PortableGetTimeOfDay.cpp
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#if defined(__WIN32__) || defined(WIN32)
7#include "PortableGettimeofday.h"
8
9void gettimeofday(struct timeval *tv, struct timezone* /*tz*/)
10{
11 DWORD count = GetTickCount();
12 tv->tv_sec = (int)(count / 1000);
13 tv->tv_usec = (count % 1000) * 1000;
14}
15#endif