-
Notifications
You must be signed in to change notification settings - Fork 4
/
timer.h
98 lines (57 loc) · 1.29 KB
/
timer.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
/*
File: timer.h
Created: September 28, 1997
Modified: August 1, 2002
Author: Gunnar Andersson (gunnar@radagast.se)
Contents: The time control mechanism.
*/
#ifndef TIMER_H
#define TIMER_H
#ifdef __cplusplus
extern "C" {
#endif
extern int current_ponder_depth;
extern int ponder_depth[100];
extern double frozen_ponder_time;
extern int frozen_ponder_depth;
/* Holds the value of the variable NODES the last time the
timer module was called to check if a panic abort occured. */
extern double last_panic_check;
void
determine_move_time( double time_left, double incr, int discs );
void
start_move( double in_total_time, double increment, int discs );
void
set_panic_threshold( double value );
void
check_panic_abort( void );
int
check_threshold( double threshold );
void
clear_panic_abort( void );
int
is_panic_abort( void );
void
toggle_abort_check( int enable );
void
init_timer( void );
double
get_real_timer( void );
void
reset_real_timer( void );
double
get_elapsed_time( void );
void
clear_ponder_times( void );
void
add_ponder_time( int move, double time );
void
adjust_current_ponder_time( int move );
int
above_recommended( void );
int
extended_above_recommended( void );
#ifdef __cplusplus
}
#endif
#endif /* TIMER_H */