![]() ![]() |
![]() |
1 mike 1.7 //%///////////////////////////////////////////////////////////////////////////// | ||
2 mike 1.1 // 3 // Copyright (c) 2000 The Open Group, BMC Software, Tivoli Systems, IBM 4 // 5 // Permission is hereby granted, free of charge, to any person obtaining a 6 // copy of this software and associated documentation files (the "Software"), 7 // to deal in the Software without restriction, including without limitation 8 // the rights to use, copy, modify, merge, publish, distribute, sublicense, 9 // and/or sell copies of the Software, and to permit persons to whom the 10 // Software is furnished to do so, subject to the following conditions: 11 // 12 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 13 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 14 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 15 // THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 16 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 17 // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 18 // DEALINGS IN THE SOFTWARE. 19 // | ||
20 mike 1.7 //============================================================================== | ||
21 mike 1.1 // | ||
22 mike 1.7 // Author: Mike Brasher (mbrasher@bmc.com) | ||
23 mike 1.1 // | ||
24 mike 1.7 // Modified By: | ||
25 mike 1.6 // | ||
26 mike 1.7 //%///////////////////////////////////////////////////////////////////////////// | ||
27 mike 1.1 28 #ifndef Pegasus_Stopwatch_h 29 #define Pegasus_Stopwatch_h 30 31 #include <Pegasus/Common/Config.h> | ||
32 mike 1.5 #include <Pegasus/Common/TimeValue.h> | ||
33 mike 1.6 #include <Pegasus/Common/System.h> | ||
34 mike 1.1 35 PEGASUS_NAMESPACE_BEGIN 36 | ||
37 karl 1.2 /** Stopwatch - A class for measuring elapsed time | ||
38 mike 1.5 Stopwatch is a class for measuring time intervals within the environment. 39 It is intended to be a developers tool primarily. | ||
40 mike 1.1 */ | ||
41 mike 1.3 class PEGASUS_COMMON_LINKAGE Stopwatch | ||
42 mike 1.1 { 43 private: | ||
44 mike 1.5 TimeValue _start; | ||
45 mike 1.1 46 public: | ||
47 karl 1.2 48 /** stopwatch constructor. The constructor creates the object and 49 starts the timer 50 @example Stopwatch time; 51 */ | ||
52 mike 1.1 Stopwatch(); 53 | ||
54 karl 1.2 /** Reset Stopwatch resets an existing Stopwatch object to the 55 current time value 56 */ | ||
57 mike 1.1 void reset(); 58 | ||
59 karl 1.2 /** getElapsed - Get the elapsed time for the defined stopwatch. 60 @return Returns the elapsed time value as a double 61 */ | ||
62 mike 1.1 double getElapsed() const; 63 | ||
64 karl 1.2 /** printElapsed method sends the current value of the timer and 65 sends it to standardout as a string with the word seconds attached 66 */ | ||
67 mike 1.1 void printElapsed(); 68 }; 69 70 PEGASUS_NAMESPACE_END 71 72 #endif /* Pegasus_Stopwatch_h */ |
No CVS admin address has been configured |
Powered by ViewCVS 0.9.2 |