Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

IndriTimer.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2004 University of Massachusetts.  All Rights Reserved.
00003  *
00004  * Use of the Lemur Toolkit for Language Modeling and Information Retrieval
00005  * is subject to the terms of the software license set forth in the LICENSE
00006  * file included with this software, and also available at
00007  * http://www.lemurproject.org/license.html
00008  *
00009  *==========================================================================
00010  */
00011 
00012 
00013 //
00014 // IndriTimer.hpp
00015 //
00016 // 13 August 2004 -- tds
00017 //
00018 
00019 #ifndef INDRI_INDRITIMER_HPP
00020 #define INDRI_INDRITIMER_HPP
00021 #include <iostream>
00022 #include "lemur-platform.h"
00023 namespace indri
00024 {
00025   namespace utility
00026   {
00027     
00030     class IndriTimer {
00031     private:
00033       UINT64 _elapsed;
00034       UINT64 _start;
00035       bool _stopped;
00036 
00037     public:
00038       IndriTimer();
00040       static UINT64 currentTime();
00042       void start();
00044       void stop();
00046       void reset();
00048       UINT64 elapsedTime() const;
00051       void printElapsedSeconds( std::ostream& out ) const;
00054       void printElapsedMicroseconds( std::ostream& out ) const;
00055     };
00056   }
00057 }
00058 
00059 #endif // INDRI_INDRITIMER_HPP
00060 

Generated on Tue Jun 15 11:02:54 2010 for Lemur by doxygen 1.3.4