![]() |
WPILibC++ 2027.0.0-alpha-4
|
Functions | |
| int64_t | wpi::nt::Now () |
| Returns monotonic current time in 1 us increments. | |
| void | wpi::nt::SetNow (int64_t timestamp) |
| Sets the current timestamp used for timestamping values that do not provide a timestamp (e.g. | |
| NT_Type | wpi::nt::GetTypeFromString (std::string_view typeString) |
| Turns a type string into a type enum value. | |
| std::string_view | wpi::nt::GetStringFromType (NT_Type type) |
| Turns a type enum value into a type string. | |
| std::string_view wpi::nt::GetStringFromType | ( | NT_Type | type | ) |
Turns a type enum value into a type string.
| type | type enum |
| NT_Type wpi::nt::GetTypeFromString | ( | std::string_view | typeString | ) |
Turns a type string into a type enum value.
| typeString | type string |
| int64_t wpi::nt::Now | ( | ) |
Returns monotonic current time in 1 us increments.
This is the same time base used for value and connection timestamps. This function by default simply wraps wpi::util::Now(), but if SetNow() is called, this function instead returns the value passed to SetNow(); this can be used to reduce overhead.
| void wpi::nt::SetNow | ( | int64_t | timestamp | ) |
Sets the current timestamp used for timestamping values that do not provide a timestamp (e.g.
a value of 0 is passed). For consistency, it also results in Now() returning the set value. This should generally be used only if the overhead of calling wpi::util::Now() is a concern. If used, it should be called periodically with the value of wpi::util::Now().
| timestamp | timestamp (1 us increments) |