Stopwatch or countdown.
More...
#include <Time.h>
|
| Time (unsigned long sec=0, unsigned long nsec=0) |
| Constructor Create a time object referencing the given time. More...
|
|
void | reset () |
| Reset timer to the current time. More...
|
|
long | elapsed_ns () |
| Elapsed time nanoseconds If you get elapsed_ns() = 1000, 1000ns are elapsed, or 1000e-9 seconds WARNING : cannot measure more than 2 seconds (long limit = 2e9; 1 seconds in ns = 1e9) More...
|
|
| ~Time () |
|
Stopwatch or countdown.
- Examples
- example_aio.cpp, example_log.cpp, and example_motor_pid_encoder.cpp.
Definition at line 14 of file Time.h.
◆ Time()
Time::Time |
( |
unsigned long |
sec = 0 , |
|
|
unsigned long |
nsec = 0 |
|
) |
| |
Constructor Create a time object referencing the given time.
Definition at line 7 of file Time.cpp.
◆ ~Time()
◆ elapsed_ns()
long Time::elapsed_ns |
( |
| ) |
|
Elapsed time nanoseconds If you get elapsed_ns() = 1000, 1000ns are elapsed, or 1000e-9 seconds WARNING : cannot measure more than 2 seconds (long limit = 2e9; 1 seconds in ns = 1e9)
- Returns
- the elapsed time in nanoseconds
- Examples
- example_aio.cpp, and example_motor_pid_encoder.cpp.
Definition at line 34 of file Time.cpp.
◆ reset()
◆ stopwatch()
◆ wait_ms()
void Time::wait_ms |
( |
long int |
ms | ) |
|
|
static |
◆ wait_s()
void Time::wait_s |
( |
long int |
s | ) |
|
|
static |
◆ wait_us()
void Time::wait_us |
( |
long int |
us | ) |
|
|
static |
◆ startTimeNsec
unsigned long myRIO::Time::startTimeNsec |
|
private |
The start time in nanosecond.
Definition at line 28 of file Time.h.
◆ startTimeSec
unsigned long myRIO::Time::startTimeSec |
|
private |
The start time in seconds.
Definition at line 27 of file Time.h.
The documentation for this class was generated from the following files:
- C:/Users/jackb/OneDrive - etu.univ-lyon1.fr/TERi/Eclipse/workspace/APIForRIO/src/Time.h
- C:/Users/jackb/OneDrive - etu.univ-lyon1.fr/TERi/Eclipse/workspace/APIForRIO/src/Time.cpp