Main MRPT website > C++ reference for MRPT 1.9.9
system/CTicTac.h
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2018, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 #pragma once
10 
11 namespace mrpt
12 {
13 namespace system
14 {
15 /** A high-performance stopwatch, with typical resolution of nanoseconds.
16  * \note The class is named after the Spanish equivalent of "Tic-Toc" ;-)
17  * \ingroup mrpt_system_grp
18  */
19 class CTicTac
20 {
21  public:
22  /** Default constructor. Implicitly calls Tic() */
23  CTicTac() noexcept;
24  CTicTac(const CTicTac&) = delete;
25  CTicTac& operator=(const CTicTac&) = delete;
26  /** Starts the stopwatch. \sa Tac() */
27  void Tic() noexcept;
28  /** Stops the stopwatch. \return Returns the ellapsed time in seconds.
29  * \sa Tic() */
30  double Tac() noexcept;
31 
32  private:
33  alignas(16) unsigned long largeInts[4];
34 }; // End of class def.
35 
36 } // namespace system
37 } // namespace mrpt
double Tac() noexcept
Stops the stopwatch.
Definition: CTicTac.cpp:90
A high-performance stopwatch, with typical resolution of nanoseconds.
CTicTac() noexcept
Default constructor.
Definition: CTicTac.cpp:63
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void Tic() noexcept
Starts the stopwatch.
Definition: CTicTac.cpp:79
CTicTac & operator=(const CTicTac &)=delete
unsigned long largeInts[4]



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at lun oct 28 00:14:14 CET 2019