MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
hrt_gstopwatch.c
1 /*
2  Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
3 
4  This program is free software; you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation; version 2 of the License.
7 
8  This program is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  GNU General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License
14  along with this program; if not, write to the Free Software
15  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 /*
19  * hrt_gstopwatch.c
20  *
21  */
22 
23 #include "hrt_gstopwatch.h"
24 
25 /*
26  * High-Resolution Time Global Stopwatch Utility -- Implementation
27  */
28 
29 static hrt_stopwatch gsw;
30 
31 extern void
32 hrt_gsw_init(int cap)
33 {
34  hrt_sw_init(&gsw, cap);
35 }
36 
37 extern void
38 hrt_gsw_close(void)
39 {
40  hrt_sw_close(&gsw);
41 }
42 
43 extern int
44 hrt_gsw_top(void)
45 {
46  return hrt_sw_top(&gsw);
47 }
48 
49 extern int
50 hrt_gsw_capacity(void)
51 {
52  return hrt_sw_capacity(&gsw);
53 }
54 
55 extern int
56 hrt_gsw_pushmark(void)
57 {
58  return hrt_sw_pushmark(&gsw);
59 }
60 
61 extern void
62 hrt_gsw_popmark(void)
63 {
64  hrt_sw_popmark(&gsw);
65 }
66 
67 extern double
68 hrt_gsw_rtmicros(int y, int x)
69 {
70  return hrt_sw_rtmicros(&gsw, y, x);
71 }
72 
73 extern double
74 hrt_gsw_ctmicros(int y, int x)
75 {
76  return hrt_sw_ctmicros(&gsw, y, x);
77 }
78 
79 extern void
80 hrt_gsw_clear(void)
81 {
82  hrt_sw_clear(&gsw);
83 }