Loading [MathJax]/extensions/tex2jax.js
CTRE Phoenix C++
5.35.1
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
Functions
Enumerations
a
c
d
e
f
g
i
l
m
n
p
r
s
t
v
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
~
Variables
_
a
b
c
d
e
f
h
i
k
l
m
n
o
p
q
r
s
t
u
v
z
Enumerations
Enumerator
a
b
c
f
g
i
l
m
n
o
p
q
r
s
t
u
Related Symbols
Files
File List
File Members
All
c
d
g
i
j
k
l
m
p
s
t
w
Functions
c
j
p
t
Variables
Macros
▼
CTRE Phoenix C++
Deprecated List
►
Namespaces
►
Classes
▼
Files
▼
File List
▼
ctre
▼
phoenix
►
led
►
motion
►
motorcontrol
►
platform
►
sensors
►
signals
►
tasking
►
unmanaged
►
CANBusAddressable.h
►
CANifier.h
►
CTRLogger.h
►
CustomParamConfiguration.h
►
HsvToRgb.h
►
LinearInterpolation.h
►
RCRadio3Ch.h
►
Stopwatch.h
►
Utilities.h
►
Phoenix.h
►
ctre
►
ctre
►
ctre
►
File Members
•
All
Classes
Namespaces
Files
Functions
Variables
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
Stopwatch.h
Go to the documentation of this file.
1
/* Copyright (C) Cross The Road Electronics 2024 */
2
#pragma once
3
4
#include <chrono>
5
#include <cstdint>
6
7
namespace
ctre
{
8
namespace
phoenix {
9
10
/**
11
* Stopwatch to track time in milliseconds
12
*/
13
class
Stopwatch
{
14
public
:
15
/**
16
* Start the stopwatch
17
*/
18
void
Start
();
19
/**
20
* @return Current time elapsed since start in ms
21
*/
22
long
long
int
DurationMs
();
23
/**
24
* @return Current time elapsed since start in s
25
*/
26
double
Duration
();
27
28
private
:
29
std::chrono::steady_clock::time_point _t0 = std::chrono::steady_clock::now();
30
std::chrono::steady_clock::time_point _t1 = std::chrono::steady_clock::now();
31
};
13
class
Stopwatch
{
…
};
32
33
}}
ctre::phoenix::Stopwatch
Stopwatch to track time in milliseconds.
Definition
Stopwatch.h:13
ctre::phoenix::Stopwatch::Start
void Start()
Start the stopwatch.
ctre::phoenix::Stopwatch::Duration
double Duration()
ctre::phoenix::Stopwatch::DurationMs
long long int DurationMs()
ctre
WPI Compliant CANcoder class.
Definition
CANCoderStatusFrame.h:4
ctre
phoenix
Stopwatch.h
Generated by
1.12.0