libstdc++: Add C++20 clocks · gcc-mirror/gcc@1736bf5 (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 1736bf5
libstdc++: Add C++20 clocks
Also add the basic types for timezones, without the non-inline definitions needed to actually use them. The get_leap_second_info function currently uses a hardcoded list of leap seconds, correct as of the end of 2022. That needs to be replaced with a dynamically generated list read from the system tzdata. That will be done in a later patch. libstdc++-v3/ChangeLog: * include/std/chrono (utc_clock, tai_clock, gps_clock): Define. (clock_time_conversion, clock_cast): Define. (sys_info, local_info): Define structs for timezone information. (nonexistent_local_time, ambiguous_local_time): Define exceptions for invalid times. (time_zone, time_zone_link, leap_second, zoned_traits, tzdb) (tzdb_list): Define classes representing time zones. (get_leap_second_info): Define new function returning leap second offset for a given time point. * testsuite/std/time/clock/gps/1.cc: New test. * testsuite/std/time/clock/tai/1.cc: New test. * testsuite/std/time/clock/utc/1.cc: New test.
File tree
4 files changed
lines changed
4 files changed
lines changed