InChI
 
Loading...
Searching...
No Matches
ichitime.h
Go to the documentation of this file.
1/*
2 * SPDX-License-Identifier: MIT
3 * Copyright (c) 2024 IUPAC and InChI Trust
4 */
5
6
7#ifndef __ICHITIME_H__
8#define __ICHITIME_H__
9
10#ifdef COMPILE_ANSI_ONLY
11
12#ifdef __FreeBSD__
13#include <sys/time.h>
14#endif
15
16/* get times() */
17#ifdef INCHI_USETIMES
18#include <sys/times.h>
19#endif
20
21/*#include <sys/timeb.h>*/
22
23#include <time.h>
24
25typedef struct tagInchiTime {
26 clock_t clockTime;
27} inchiTime;
28
29#else
30
31/* Win32 _ftime(): */
32#include <time.h>
33
34typedef struct tagInchiTime {
35 unsigned long clockTime; /* Time in seconds since midnight (00:00:00), January 1, 1970;
36 signed long overflow expected in 2038 */
37 long millitime; /* milliseconds */
39
40#endif
41
42#ifndef COMPILE_ALL_CPP
43#ifdef __cplusplus
44extern "C" {
45#endif
46#endif
47
48
56
57 void InchiTimeGet( inchiTime *TickEnd );
58
59 long InchiTimeMsecDiff( INCHI_CLOCK *ic, inchiTime *TickEnd, inchiTime *TickStart );
60 void InchiTimeAddMsec( INCHI_CLOCK *ic, inchiTime *TickEnd, unsigned long nNumMsec );
61 int bInchiTimeIsOver( INCHI_CLOCK *ic, inchiTime *TickEnd );
62 long InchiTimeElapsed( INCHI_CLOCK *ic, inchiTime *TickStart );
63
64#ifndef COMPILE_ALL_CPP
65#ifdef __cplusplus
66}
67#endif
68#endif
69
70
71#endif /* __ICHITIME_H__ */
void InchiTimeAddMsec(INCHI_CLOCK *ic, inchiTime *TickEnd, unsigned long nNumMsec)
Definition ichicano.c:199
long InchiTimeMsecDiff(INCHI_CLOCK *ic, inchiTime *TickEnd, inchiTime *TickStart)
Definition ichicano.c:116
long InchiTimeElapsed(INCHI_CLOCK *ic, inchiTime *TickStart)
Definition ichicano.c:188
int bInchiTimeIsOver(INCHI_CLOCK *ic, inchiTime *TickEnd)
Definition ichicano.c:222
struct tagINCHI_CLOCK INCHI_CLOCK
struct tagInchiTime inchiTime
void InchiTimeGet(inchiTime *TickEnd)
Definition ichicano.c:111
Definition ichitime.h:50
clock_t m_HalfMinNegativeClock
Definition ichitime.h:54
clock_t m_MaxPositiveClock
Definition ichitime.h:51
clock_t m_MinNegativeClock
Definition ichitime.h:52
clock_t m_HalfMaxPositiveClock
Definition ichitime.h:53
Definition ichitime.h:34
unsigned long clockTime
Definition ichitime.h:35
long millitime
Definition ichitime.h:37