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