Toggle navigation
SCIP Optimization Suite
SCIP
SoPlex
ZIMPL
UG
GCG
Documentation
SCIP 9.2.0
SCIP 8.1.0
SCIP 7.0.3
SCIP 6.0.2
SCIP 5.0.1
SCIP 4.0.1
SCIP 3.2.1
SCIP
Solving Constraint Integer Programs
Overview
Files
Plugin Types
Interfaces
Examples
How To
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
scip-repo
src
scip
clock.h
Go to the documentation of this file.
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2
/* */
3
/* This file is part of the program and library */
4
/* SCIP --- Solving Constraint Integer Programs */
5
/* */
6
/* Copyright (C) 2002-2014 Konrad-Zuse-Zentrum */
7
/* fuer Informationstechnik Berlin */
8
/* */
9
/* SCIP is distributed under the terms of the ZIB Academic License. */
10
/* */
11
/* You should have received a copy of the ZIB Academic License */
12
/* along with SCIP; see the file COPYING. If not email to scip@zib.de. */
13
/* */
14
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15
16
/**@file clock.h
17
* @brief internal methods for clocks and timing issues
18
* @author Tobias Achterberg
19
*/
20
21
/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
22
23
#ifndef __SCIP_CLOCK_H__
24
#define __SCIP_CLOCK_H__
25
26
27
#include "
scip/def.h
"
28
#include "
scip/type_retcode.h
"
29
#include "
scip/type_set.h
"
30
#include "
scip/type_clock.h
"
31
32
#ifdef __cplusplus
33
extern
"C"
{
34
#endif
35
36
/** creates a clock and initializes it */
37
extern
38
SCIP_RETCODE
SCIPclockCreate
(
39
SCIP_CLOCK
** clck,
/**< pointer to clock timer */
40
SCIP_CLOCKTYPE
clocktype
/**< type of clock */
41
);
42
43
/** frees a clock */
44
extern
45
void
SCIPclockFree
(
46
SCIP_CLOCK
** clck
/**< pointer to clock timer */
47
);
48
49
/** initializes and resets a clock */
50
extern
51
void
SCIPclockInit
(
52
SCIP_CLOCK
* clck,
/**< clock timer */
53
SCIP_CLOCKTYPE
clocktype
/**< type of clock */
54
);
55
56
/** completely stop the clock and reset the clock's counter to zero */
57
extern
58
void
SCIPclockReset
(
59
SCIP_CLOCK
* clck
/**< clock timer */
60
);
61
62
/** enables the clock */
63
extern
64
void
SCIPclockEnable
(
65
SCIP_CLOCK
* clck
/**< clock timer */
66
);
67
68
/** disables and resets the clock */
69
extern
70
void
SCIPclockDisable
(
71
SCIP_CLOCK
* clck
/**< clock timer */
72
);
73
74
/** sets the type of the clock, overriding the default clock type, and resets the clock */
75
extern
76
void
SCIPclockSetType
(
77
SCIP_CLOCK
* clck,
/**< clock timer */
78
SCIP_CLOCKTYPE
clocktype
/**< type of clock */
79
);
80
81
/** starts measurement of time in the given clock, update the clock's type if it is bound to the default type */
82
extern
83
void
SCIPclockStart
(
84
SCIP_CLOCK
* clck,
/**< clock timer */
85
SCIP_SET
*
set
/**< global SCIP settings */
86
);
87
88
/** stops measurement of time in the given clock */
89
extern
90
void
SCIPclockStop
(
91
SCIP_CLOCK
* clck,
/**< clock timer */
92
SCIP_SET
*
set
/**< global SCIP settings */
93
);
94
95
/** returns whether the clock is currently running */
96
extern
97
SCIP_Bool
SCIPclockIsRunning
(
98
SCIP_CLOCK
* clck
/**< clock timer */
99
);
100
101
/** gets the used time of this clock in seconds */
102
extern
103
SCIP_Real
SCIPclockGetTime
(
104
SCIP_CLOCK
* clck
/**< clock timer */
105
);
106
107
/** gets the last validated time of this clock in seconds */
108
extern
109
SCIP_Real
SCIPclockGetLastTime
(
110
SCIP_CLOCK
* clck
/**< clock timer */
111
);
112
113
/** sets the used time of this clock in seconds */
114
extern
115
void
SCIPclockSetTime
(
116
SCIP_CLOCK
* clck,
/**< clock timer */
117
SCIP_Real
sec
/**< time in seconds to set the clock's timer to */
118
);
119
120
/** gets current time of day in seconds (standard time zone) */
121
extern
122
SCIP_Real
SCIPclockGetTimeOfDay
(
123
void
124
);
125
126
#ifdef __cplusplus
127
}
128
#endif
129
130
#endif
131