Basic Image AlgorithmS Library
2.8.0
Main Page
Related Pages
Modules
Classes
Examples
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
Base
Debug
Examples
ExampleRealtime.cpp
1
/*
2
This file is part of the BIAS library (Basic ImageAlgorithmS).
3
4
Copyright (C) 2003-2009 (see file CONTACT for details)
5
Multimediale Systeme der Informationsverarbeitung
6
Institut fuer Informatik
7
Christian-Albrechts-Universitaet Kiel
8
9
10
BIAS is free software; you can redistribute it and/or modify
11
it under the terms of the GNU Lesser General Public License as published by
12
the Free Software Foundation; either version 2.1 of the License, or
13
(at your option) any later version.
14
15
BIAS is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
GNU Lesser General Public License for more details.
19
20
You should have received a copy of the GNU Lesser General Public License
21
along with BIAS; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
*/
24
25
26
/**
27
@example ExampleRealtime.cpp
28
@relates Timing
29
@brief Example for using the logging facility
30
@ingroup g_examples
31
@author MIP
32
\todo fix WIN32 performance counters and TimeMeasure realtime / wall clock counters.
33
*/
34
35
#include <Base/Common/LeakChecking.h>
36
#include <Base/Debug/Timing.hh>
37
#include <iostream>
38
39
#ifdef WIN32
40
# include <windows.h>
41
#endif
42
43
using namespace
std;
44
45
void
func(
void
)
46
{
47
{
48
unsigned
int
n=10000;
49
int
* p =
new
int
[n];
50
for
(
unsigned
int
i=0; i<n; i++)
51
p[i] =0;
52
delete
[] p;
53
}
54
55
#ifdef WIN32
56
LARGE_INTEGER time;
57
//LARGE_INTEGER freq;
58
if
(QueryPerformanceCounter(&time) == 0){
59
}
60
#endif
61
}
62
63
int
main(
int
argc,
char
*argv[])
64
{
65
func();
66
67
//double start=0, stop=0, diff=0;
68
//start = BIAS::realtime();
69
//stop = BIAS::realtime();
70
//diff = stop-start;
71
72
//cout<<"diff= "<<diff<<endl;
73
return
0;
74
}
Generated on Tue Feb 6 2018 02:01:31 for Basic Image AlgorithmS Library by
1.8.5