1 /* LIBGIMP - The GIMP Library
2 * Copyright (C) 1995-2003 Peter Mattis and Spencer Kimball
6 * This library is free software: you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library. If not, see
18 * <https://www.gnu.org/licenses/>.
21 /* NOTE: This file is auto-generated by pdbgen.pl */
31 * @short_description: Debug utility functions
33 * Miscellaneous debug utility functions. Not part of the stable
39 * gimp_debug_timer_start:
41 * Starts measuring elapsed time.
43 * This procedure starts a timer, measuring the elapsed time since the
44 * call. Each call to this procedure should be matched by a call to
45 * gimp_debug_timer_end(), which returns the elapsed time.
46 * If there is already an active timer, it is not affected by the call,
47 * however, a matching gimp_debug_timer_end() call is still required.
49 * This is a debug utility procedure. It is subject to change at any
50 * point, and should not be used in production.
52 * Returns: TRUE on success.
55 gimp_debug_timer_start (void)
57 GimpParam
*return_vals
;
59 gboolean success
= TRUE
;
61 return_vals
= gimp_run_procedure ("gimp-debug-timer-start",
65 success
= return_vals
[0].data
.d_status
== GIMP_PDB_SUCCESS
;
67 gimp_destroy_params (return_vals
, nreturn_vals
);
73 * gimp_debug_timer_end:
75 * Finishes measuring elapsed time.
77 * This procedure stops the timer started by a previous
78 * gimp_debug_timer_start() call, and prints and returns the elapsed
80 * If there was already an active timer at the time of corresponding
81 * call to gimp_debug_timer_start(), a dummy value is returned.
83 * This is a debug utility procedure. It is subject to change at any
84 * point, and should not be used in production.
86 * Returns: The elapsed time, in seconds.
89 gimp_debug_timer_end (void)
91 GimpParam
*return_vals
;
93 gdouble elapsed
= 0.0;
95 return_vals
= gimp_run_procedure ("gimp-debug-timer-end",
99 if (return_vals
[0].data
.d_status
== GIMP_PDB_SUCCESS
)
100 elapsed
= return_vals
[1].data
.d_float
;
102 gimp_destroy_params (return_vals
, nreturn_vals
);