ntcore functions

ntcore._now() int

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.

Returns:

Timestamp

ntcore._setNow(timestamp: int) None

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().

Parameters:

timestamp – timestamp (1 us increments)