WPILibC++ 2023.4.3
|
Functions | |
int64_t | nt::Now () |
Returns monotonic current time in 1 us increments. More... | |
void | nt::SetNow (int64_t timestamp) |
Sets the current timestamp used for timestamping values that do not provide a timestamp (e.g. More... | |
NT_Type | nt::GetTypeFromString (std::string_view typeString) |
Turns a type string into a type enum value. More... | |
std::string_view | nt::GetStringFromType (NT_Type type) |
Turns a type enum value into a type string. More... | |
std::string_view nt::GetStringFromType | ( | NT_Type | type | ) |
Turns a type enum value into a type string.
type | type enum |
NT_Type nt::GetTypeFromString | ( | std::string_view | typeString | ) |
Turns a type string into a type enum value.
typeString | type string |
int64_t 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::Now(), but if SetNow() is called, this function instead returns the value passed to SetNow(); this can be used to reduce overhead.
void 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::Now() is a concern. If used, it should be called periodically with the value of wpi::Now().
timestamp | timestamp (1 us increments) |