FancySafeBot 0.0.1
A safe robotics library
Loading...
Searching...
No Matches
fsb::PeriodicTimer Class Reference

Detailed Description

Compute forward kinematics.

#include <fsb_timing.h>

Collaboration diagram for fsb::PeriodicTimer:
Collaboration graph

Public Member Functions

TimingError initialize (const timespec &step_size)
 Initialize periodic timer.
 
TimingError start ()
 Start timer.
 
TimingError step (real_t &nominal_time, real_t &remainder)
 Wait for next step.
 

Member Function Documentation

◆ initialize()

TimingError fsb::PeriodicTimer::initialize ( const timespec &  step_size)

Initialize periodic timer.

Parameters
step_sizeTimer step size
Returns
Timing error code

◆ start()

TimingError fsb::PeriodicTimer::start ( )

Start timer.

The current time from the high-resolution monotonic timer will be used.

Returns
Timing error code

◆ step()

TimingError fsb::PeriodicTimer::step ( real_t &  nominal_time,
real_t &  remainder 
)

Wait for next step.

The target time is based on number of times step is called after calling start. The actual elapsed time is equal to the addition of the nominal time and remainder.

Parameters
nominal_timeTarget elapsed time since calling start()
remainderActual time delay after target elapsed time
Returns
Timing error code

The documentation for this class was generated from the following files: