plibsys 0.0.5
ptimeprofiler.h
Go to the documentation of this file.
1/*
2 * The MIT License
3 *
4 * Copyright (C) 2013-2016 Alexander Saprykin <saprykin.spb@gmail.com>
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining
7 * a copy of this software and associated documentation files (the
8 * 'Software'), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sublicense, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice shall be
15 * included in all copies or substantial portions of the Software.
16 *
17 * THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
18 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
20 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
21 * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 */
25
44#if !defined (PLIBSYS_H_INSIDE) && !defined (PLIBSYS_COMPILATION)
45# error "Header files shouldn't be included directly, consider using <plibsys.h> instead."
46#endif
47
48#ifndef PLIBSYS_HEADER_PTIMEPROFILER_H
49#define PLIBSYS_HEADER_PTIMEPROFILER_H
50
51#include <pmacros.h>
52#include <ptypes.h>
53
55
57typedef struct PTimeProfiler_ PTimeProfiler;
58
65
75
83
90
92
93#endif /* PLIBSYS_HEADER_PTIMEPROFILER_H */
Miscellaneous macros.
#define P_BEGIN_DECLS
Starts .h file declarations to be exported as C functions.
Definition pmacros.h:298
#define P_END_DECLS
Closes .h file declarations to be exported as C functions, should be always used after P_BEGIN_DECLS.
Definition pmacros.h:299
#define P_LIB_API
Exports a symbol from a shared library.
Definition pmacros.h:138
P_LIB_API void p_time_profiler_reset(PTimeProfiler *profiler)
Resets the PTimeProfiler's internal counter to zero.
P_LIB_API puint64 p_time_profiler_elapsed_usecs(const PTimeProfiler *profiler)
Calculates elapsed time since the last reset or creation.
P_LIB_API PTimeProfiler * p_time_profiler_new(void)
Creates a new PTimeProfiler object.
struct PTimeProfiler_ PTimeProfiler
Time profiler opaque data structure.
P_LIB_API void p_time_profiler_free(PTimeProfiler *profiler)
Frees PTimeProfiler object.
Types definitions.
unsigned __int64 puint64
Type for unsigned 64 bit.
Definition ptypes.h:97