modm API documentation
modm::chrono::milli_clock Struct Reference

#include <modm/architecture/interface/clock.hpp>

Inheritance diagram for modm::chrono::milli_clock:
modm_test::chrono::milli_clock

Public Typedefs

using duration = std::chrono::duration< uint32_t, std::milli >
 
using rep = duration::rep
 
using period = duration::period
 
using time_point = std::chrono::time_point< milli_clock, duration >
 

Static Public Member Functions

static time_point now () noexcept
 

Static Public Attributes

static constexpr bool is_steady = false
 

Detailed Description

Returns a time_point in milliseconds.

This clock is meant for measuring durations (time differences), not time since reboot. You must not depend on this clock for timekeeping, especially not over long periods of time, since:

    >
  1. the clock is NOT STEADY! The 32-bit millisecond counter will wrap around after ~49 days!
  2. the clock may have quite some drift and is not synchable to an external reference. You must therefore not rely on this clock for very long durations that need to be accurate.

You must use an actual calendar implementation for proper time keeping!


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