InChI
 
Loading...
Searching...
No Matches
ichitime.h
Go to the documentation of this file.
1/*
2 * International Chemical Identifier (InChI)
3 * Version 1
4 * Software version 1.07
5 * April 30, 2024
6 *
7 * MIT License
8 *
9 * Copyright (c) 2024 IUPAC and InChI Trust
10 *
11 * Permission is hereby granted, free of charge, to any person obtaining a copy
12 * of this software and associated documentation files (the "Software"), to deal
13 * in the Software without restriction, including without limitation the rights
14 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 * copies of the Software, and to permit persons to whom the Software is
16 * furnished to do so, subject to the following conditions:
17 *
18 * The above copyright notice and this permission notice shall be included in all
19 * copies or substantial portions of the Software.
20 *
21 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
27 * SOFTWARE.
28*
29* The InChI library and programs are free software developed under the
30 * auspices of the International Union of Pure and Applied Chemistry (IUPAC).
31 * Originally developed at NIST.
32 * Modifications and additions by IUPAC and the InChI Trust.
33 * Some portions of code were developed/changed by external contributors
34 * (either contractor or volunteer) which are listed in the file
35 * 'External-contributors' included in this distribution.
36 *
37 * info@inchi-trust.org
38 *
39*/
40
41
42#ifndef __ICHITIME_H__
43#define __ICHITIME_H__
44
45#ifdef COMPILE_ANSI_ONLY
46
47#ifdef __FreeBSD__
48#include <sys/time.h>
49#endif
50
51/* get times() */
52#ifdef INCHI_USETIMES
53#include <sys/times.h>
54#endif
55
56/*#include <sys/timeb.h>*/
57
58#include <time.h>
59
60typedef struct tagInchiTime {
61 clock_t clockTime;
62} inchiTime;
63
64#else
65
66/* Win32 _ftime(): */
67#include <time.h>
68
69typedef struct tagInchiTime {
70 unsigned long clockTime; /* Time in seconds since midnight (00:00:00), January 1, 1970;
71 signed long overflow expected in 2038 */
72 long millitime; /* milliseconds */
74
75#endif
76
77#ifndef COMPILE_ALL_CPP
78#ifdef __cplusplus
79extern "C" {
80#endif
81#endif
82
83
91
92 void InchiTimeGet( inchiTime *TickEnd );
93
94 long InchiTimeMsecDiff( INCHI_CLOCK *ic, inchiTime *TickEnd, inchiTime *TickStart );
95 void InchiTimeAddMsec( INCHI_CLOCK *ic, inchiTime *TickEnd, unsigned long nNumMsec );
96 int bInchiTimeIsOver( INCHI_CLOCK *ic, inchiTime *TickEnd );
97 long InchiTimeElapsed( INCHI_CLOCK *ic, inchiTime *TickStart );
98
99#ifndef COMPILE_ALL_CPP
100#ifdef __cplusplus
101}
102#endif
103#endif
104
105
106#endif /* __ICHITIME_H__ */
void InchiTimeAddMsec(INCHI_CLOCK *ic, inchiTime *TickEnd, unsigned long nNumMsec)
Definition ichicano.c:234
long InchiTimeMsecDiff(INCHI_CLOCK *ic, inchiTime *TickEnd, inchiTime *TickStart)
Definition ichicano.c:151
long InchiTimeElapsed(INCHI_CLOCK *ic, inchiTime *TickStart)
Definition ichicano.c:223
int bInchiTimeIsOver(INCHI_CLOCK *ic, inchiTime *TickEnd)
Definition ichicano.c:257
struct tagINCHI_CLOCK INCHI_CLOCK
struct tagInchiTime inchiTime
void InchiTimeGet(inchiTime *TickEnd)
Definition ichicano.c:146
Definition ichitime.h:85
clock_t m_HalfMinNegativeClock
Definition ichitime.h:89
clock_t m_MaxPositiveClock
Definition ichitime.h:86
clock_t m_MinNegativeClock
Definition ichitime.h:87
clock_t m_HalfMaxPositiveClock
Definition ichitime.h:88
Definition ichitime.h:69
unsigned long clockTime
Definition ichitime.h:70
long millitime
Definition ichitime.h:72