Blender
V4.3
source
blender
freestyle
intern
system
TimeUtils.h
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
5
#pragma once
6
12
#include <
time.h
>
13
14
#ifdef WITH_CXX_GUARDEDALLOC
15
# include "
MEM_guardedalloc.h
"
16
#endif
17
18
namespace
Freestyle
{
19
20
class
Chronometer
{
21
public
:
22
inline
Chronometer
() {}
23
inline
~Chronometer
() {}
24
25
inline
clock_t
start
()
26
{
27
_start = clock();
28
return
_start;
29
}
30
31
inline
double
stop
()
32
{
33
clock_t
stop
= clock();
34
return
(
double
)(
stop
- _start) / CLOCKS_PER_SEC;
35
}
36
37
private
:
38
clock_t _start;
39
40
#ifdef WITH_CXX_GUARDEDALLOC
41
MEM_CXX_CLASS_ALLOC_FUNCS(
"Freestyle:Chronometer"
)
42
#endif
43
};
44
45
}
/* namespace Freestyle */
MEM_guardedalloc.h
Read Guarded memory(de)allocation.
Freestyle::Chronometer
Definition
TimeUtils.h:20
Freestyle::Chronometer::stop
double stop()
Definition
TimeUtils.h:31
Freestyle::Chronometer::~Chronometer
~Chronometer()
Definition
TimeUtils.h:23
Freestyle::Chronometer::Chronometer
Chronometer()
Definition
TimeUtils.h:22
Freestyle::Chronometer::start
clock_t start()
Definition
TimeUtils.h:25
Freestyle
inherits from class Rep
Definition
AppCanvas.cpp:20
time.h
Generated on Thu Feb 6 2025 07:36:39 for Blender by
doxygen
1.11.0