Zorba
The XQuery Processor
Documentation
Live Demo
Modules
Download
Tools
Blog
Code
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
include
zorba
util
timer.h
Go to the documentation of this file.
1
/*
2
* Copyright 2006-2008 The FLWOR Foundation.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#ifndef ZORBA_UTIL_TIMER_H
18
#define ZORBA_UTIL_TIMER_H
19
20
#include <
zorba/util/time.h
>
21
22
namespace
zorba
23
{
24
25
namespace
time
26
{
27
28
class
Timer
{
29
public
:
30
void
start
() {
31
get_current_walltime
(theStart);
32
}
33
34
double
elapsed
()
const
{
35
walltime
lEnd;
36
get_current_walltime
(lEnd);
37
return
get_walltime_elapsed
(theStart, lEnd);
38
}
39
40
long
getStart
()
const
{
41
return
get_walltime_in_millis
(theStart);
42
}
43
44
private
:
45
walltime
theStart;
46
};
47
48
}
49
50
}
51
52
#endif
53
54
/*
55
* Local variables:
56
* mode: c++
57
* End:
58
*/
59
/* vim:set et sw=2 ts=2: */
Please enable JavaScript to view the
comments powered by Disqus.
blog comments powered by
Disqus