SaturnRingLibrary 0.9.2
SGL wrapper
Loading...
Searching...
No Matches

◆ operator-()

Tickstamp SRL::Tickstamp::operator- ( const Tickstamp & other) const
inlinenoexcept

64-bit subtraction with borrow (hardware-accelerated).

Parameters
otherTickstamp to subtract from this one (this - other)
Returns
New Tickstamp containing the difference

Performs atomic 64-bit subtraction using inline SH-2 assembly (subc). The operation handles overflow/borrow correctly across the 64-bit range.

Operation:
result = this - other; // 64-bit subtraction with carry/borrow
Example:
Tickstamp later = Timer::Capture();
Tickstamp earlier = Timer::Capture();
Tickstamp diff = later - earlier; // Time elapsed between captures
static Tickstamp Capture() noexcept
Captures current hardware state into a Tickstamp.
Definition srl_timer.hpp:1082
Note
This is the primary method for calculating time deltas. The result maintains full 48-bit precision for subsequent conversion.