Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef ZORBA_UTIL_TIMER_H
00018 #define ZORBA_UTIL_TIMER_H
00019
00020 #include <zorba/util/time.h>
00021
00022 namespace zorba
00023 {
00024
00025 namespace time
00026 {
00027
00028 class Timer {
00029 public:
00030 void start() {
00031 get_current_walltime(theStart);
00032 }
00033
00034 double elapsed() const {
00035 walltime lEnd;
00036 get_current_walltime(lEnd);
00037 return get_walltime_elapsed(theStart, lEnd);
00038 }
00039
00040 long getStart() const {
00041 return get_walltime_in_millis(theStart);
00042 }
00043
00044 private:
00045 walltime theStart;
00046 };
00047
00048 }
00049
00050 }
00051
00052 #endif
00053
00054
00055
00056
00057
00058
00059