CTRE Phoenix 6 C++ 25.0.0-beta-4
Loading...
Searching...
No Matches
Utils.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) Cross The Road Electronics.  All rights reserved.
3 * License information can be found in CTRE_LICENSE.txt
4 * For support and suggestions contact support@ctr-electronics.com or file
5 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
6 */
7#pragma once
8
10
11namespace ctre {
12namespace phoenix6 {
13namespace utils {
14
15 /**
16 * \brief Get the current timestamp in seconds.
17 *
18 * This is the time source used for status signals.
19 *
20 * This time source is typically continuous and monotonic.
21 * However, it may be overridden in simulation to use a
22 * non-monotonic, non-continuous source.
23 *
24 * \returns Current time in seconds.
25 */
27 /**
28 * \brief Get the system timestamp in seconds.
29 *
30 * This is NOT the time source used for status signals.
31 * Use GetCurrentTimeSeconds instead when working with
32 * status signal timing.
33 *
34 * This time source is guaranteed to be continuous and
35 * monotonic, making it useful for measuring time deltas
36 * in a robot program.
37 *
38 * \returns System time in seconds.
39 */
41 /**
42 * \brief Get whether the program is running in simulation.
43 *
44 * \returns `true` if in simulation
45 */
47 /**
48 * \brief Get whether the program is running in replay mode.
49 *
50 * \returns `true` if in replay mode
51 */
53
54}
55}
56}
#define CTREXPORT
Definition export.h:14
CTREXPORT double GetSystemTimeSeconds()
Get the system timestamp in seconds.
CTREXPORT bool IsSimulation()
Get whether the program is running in simulation.
CTREXPORT double GetCurrentTimeSeconds()
Get the current timestamp in seconds.
CTREXPORT bool IsReplay()
Get whether the program is running in replay mode.
Definition StatusCodes.h:18