MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
utils_HrtStopwatch.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 #include <jni.h>
19 
20 #include "utils_HrtStopwatch.h"
21 #include "hrt_gstopwatch.h"
22 
23 JNIEXPORT void JNICALL
24 Java_utils_HrtStopwatch_init(JNIEnv *env, jclass cls,
25  jint cap)
26 {
27  hrt_gsw_init(cap);
28 }
29 
30 JNIEXPORT void JNICALL
31 Java_utils_HrtStopwatch_close(JNIEnv *env, jclass cls)
32 {
33  hrt_gsw_close();
34 }
35 
36 JNIEXPORT jint JNICALL
37 Java_utils_HrtStopwatch_top(JNIEnv *env, jclass cls)
38 {
39  return hrt_gsw_top();
40 }
41 
42 JNIEXPORT jint JNICALL
43 Java_utils_HrtStopwatch_capacity(JNIEnv *env, jclass cls)
44 {
45  return hrt_gsw_capacity();
46 }
47 
48 JNIEXPORT jint JNICALL
49 Java_utils_HrtStopwatch_pushmark(JNIEnv *env, jclass cls)
50 {
51  return hrt_gsw_pushmark();
52 }
53 
54 JNIEXPORT void JNICALL
55 Java_utils_HrtStopwatch_popmark(JNIEnv * env, jclass cls)
56 {
57  hrt_gsw_popmark();
58 }
59 
60 JNIEXPORT jdouble JNICALL
61 Java_utils_HrtStopwatch_rtmicros(JNIEnv *env, jclass cls,
62  jint y, jint x)
63 {
64  return hrt_gsw_rtmicros(y, x);
65 }
66 
67 JNIEXPORT jdouble JNICALL
68 Java_utils_HrtStopwatch_ctmicros(JNIEnv *env, jclass cls,
69  jint y, jint x)
70 {
71  return hrt_gsw_ctmicros(y, x);
72 }
73 
74 JNIEXPORT void JNICALL
75 Java_utils_HrtStopwatch_clear(JNIEnv *env, jclass cls)
76 {
77  hrt_gsw_clear();
78 }