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
mrpt::system::CTicTac
A high-performance stopwatch, with typical resolution of nanoseconds.
Definition: system/CTicTac.h:19
mrpt::system::CTicTac::largeInts
unsigned long largeInts[4]
Definition: system/CTicTac.h:33
mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: CKalmanFilterCapable.h:30
mrpt::system::CTicTac::Tac
double Tac() noexcept
Stops the stopwatch.
Definition: CTicTac.cpp:90
mrpt::system::CTicTac::Tic
void Tic() noexcept
Starts the stopwatch.
Definition: CTicTac.cpp:79
mrpt::system::CTicTac::operator=
CTicTac & operator=(const CTicTac &)=delete
mrpt::system::CTicTac::CTicTac
CTicTac() noexcept
Default constructor.
Definition: CTicTac.cpp:63



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST