C++20's Process • Implementing in the Open • Organization of Work • Part II: Calendrical Types • Part III: Clocks • Part IV: Leap Seconds • What are leap seconds? • How did we implement them in MSVC? • Part Feature branch (feature/chrono) for rapid development and collaboration • Code Review Videos! • clocks, clock_cast, leap_seconds (https://youtu.be/WX3OmVu4lAs) • time_zone and time_zone_link (https://youtu clients of them! Plus, the types often end up boiling down to constants anyway!18 Part III: Clocks19 What is a clock? #include#include using namespace std::chrono; class MyClock 0 码力 | 55 页 | 8.67 MB | 6 月前3
A Crash Course in Calendars, Dates, Time, and Time ZonesCompile-Time Rational Numbers Durations Clocks Time Points Dates Time Zones4 Agenda Compile-Time Rational Numbers Durations Clocks Time Points Dates Time Zones5 = ratio<1'000'000'000'000'000'000, 1>;9 Agenda Compile-Time Rational Numbers Durations Clocks Time Points Dates Time Zones10 Durations Interval between two points in time Represented // 1.519 Agenda Compile-Time Rational Numbers Durations Clocks Time Points Dates Time Zones20 Clocks Several clocks available in : std::system_clock: wall clock time from 0 码力 | 43 页 | 551.60 KB | 6 月前3
C++20: An (Almost) Complete Overviewweeks w { 1 }; // 1 week days d { w }; // Convert 1 week into days62 Calendars & Timezones New clocks (besides system_clock, steady_clock, high_resolution_clock): utc_clock: represents Coordinated0 码力 | 85 页 | 512.18 KB | 6 月前3
共 3 条
- 1













