CTRE Phoenix 6 C++ 24.50.0-alpha-2
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 {
13
14 /**
15 * \brief Get the current timestamp in seconds.
16 *
17 * This is the time source used for status signals.
18 *
19 * This time source is typically continuous and monotonic.
20 * However, it may be overridden in simulation to use a
21 * non-monotonic, non-continuous source.
22 *
23 * \returns Current time in seconds.
24 */
26 /**
27 * \brief Get the system timestamp in seconds.
28 *
29 * This is NOT the time source used for status signals.
30 * Use GetCurrentTImeSeconds instead when working with
31 * status signal timing.
32 *
33 * This time source is guaranteed to be continuous and
34 * monotonic, making it useful for measuring time deltas
35 * in a robot program.
36 *
37 * \returns System time in seconds.
38 */
40 /**
41 * \brief Get whether the program is running in simulation.
42 *
43 * \returns `true` if in simulation
44 */
46 /**
47 * \brief Get whether the program is running in replay mode.
48 *
49 * \returns `true` if in replay mode
50 */
52
53}
54}
#define CTREXPORT
Definition: export.h:14
CTREXPORT bool IsReplay()
Get whether the program is running in replay mode.
CTREXPORT double GetCurrentTimeSeconds()
Get the current timestamp in seconds.
CTREXPORT bool IsSimulation()
Get whether the program is running in simulation.
CTREXPORT double GetSystemTimeSeconds()
Get the system timestamp in seconds.
Represents the state of one swerve module.
Definition: StatusCodes.h:18