Formula Student Electronics & Software
The code for the embedded software
Loading...
Searching...
No Matches
teensy_clock Struct Reference

#include <teensy_clock.h>

Collaboration diagram for teensy_clock:
Collaboration graph

Public Types

using duration = std::chrono::duration< uint64_t, std::ratio< 1, F_CPU > >
 
using rep = duration::rep
 
using period = duration::period
 
using time_point = std::chrono::time_point< teensy_clock, duration >
 

Static Public Member Functions

static time_point now ()
 
static void begin (bool sync=true)
 
static void syncToRTC ()
 
static std::time_t to_time_t (const time_point &t)
 
static time_point from_time_t (std::time_t t)
 

Static Public Attributes

static constexpr bool is_steady = false
 

Detailed Description

Definition at line 8 of file teensy_clock.h.

Member Typedef Documentation

◆ duration

using teensy_clock::duration = std::chrono::duration<uint64_t, std::ratio<1, F_CPU> >

Definition at line 11 of file teensy_clock.h.

◆ period

using teensy_clock::period = duration::period

Definition at line 13 of file teensy_clock.h.

◆ rep

using teensy_clock::rep = duration::rep

Definition at line 12 of file teensy_clock.h.

◆ time_point

using teensy_clock::time_point = std::chrono::time_point<teensy_clock, duration>

Definition at line 14 of file teensy_clock.h.

Member Function Documentation

◆ begin()

void teensy_clock::begin ( bool  sync = true)
static

Definition at line 4 of file teensy_clock.cpp.

Here is the call graph for this function:

◆ from_time_t()

teensy_clock::time_point teensy_clock::from_time_t ( std::time_t  t)
static

Definition at line 16 of file teensy_clock.cpp.

◆ now()

static time_point teensy_clock::now ( )
inlinestatic

Definition at line 18 of file teensy_clock.h.

Here is the call graph for this function:

◆ syncToRTC()

void teensy_clock::syncToRTC ( )
static

Definition at line 23 of file teensy_clock.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ to_time_t()

std::time_t teensy_clock::to_time_t ( const time_point t)
static

Definition at line 10 of file teensy_clock.cpp.

Member Data Documentation

◆ is_steady

constexpr bool teensy_clock::is_steady = false
staticconstexpr

Definition at line 16 of file teensy_clock.h.


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