Skip to content

Commit 9aec950

Browse files
author
Colin Robertson
authored
Merge pull request MicrosoftDocs#3373 from MicrosoftDocs/FromPrivateLiveToMaster
Resolve syncing conflicts from FromPrivateLiveToMaster to master
2 parents 2c3e81e + b336e64 commit 9aec950

File tree

4 files changed

+47
-30
lines changed

4 files changed

+47
-30
lines changed

docs/standard-library/chrono.md

Lines changed: 22 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
---
22
description: "Learn more about: <chrono>"
33
title: "<chrono>"
4-
ms.date: 09/02/2021
4+
ms.date: 09/15/2021
55
f1_keywords: ["<chrono>", "chrono/std::chrono::nanoseconds", "chrono/std::chrono::minutes", "chrono/std::chrono::seconds", "chrono/std::chrono::hours", "chrono/std::chrono::milliseconds", "chrono/std::chrono::microseconds"]
66
---
77

88
# `<chrono>`
99

1010
Include the standard header `<chrono>` to define classes and functions that represent and manipulate time durations and time instants.
1111

12-
Beginning in Visual Studio 2015, the implementation of `steady_clock` has changed to meet the C++ Standard requirements for steadiness and monotonicity. `steady_clock` is now based on `QueryPerformanceCounter()`, and `high_resolution_clock` is now a typedef for `steady_clock`. As a result, in the Microsoft C++ compiler `steady_clock::time_point` is now a `typedef` for `chrono::time_point<steady_clock>`; however, this rule isn't necessarily the case for other implementations.
12+
Beginning in Visual Studio 2015, the implementation of `steady_clock` has changed to meet the C++ Standard requirements for steadiness and monotonicity:
13+
- `steady_clock` is now based on `QueryPerformanceCounter()`
14+
- `high_resolution_clock` is now a typedef for `steady_clock`
15+
In the Microsoft C++ implementation, `steady_clock::time_point` is now a `typedef` for `chrono::time_point<steady_clock>`. However, this isn't necessarily the case for other implementations.
1316

1417
## Requirements
1518

@@ -26,7 +29,7 @@ Beginning in Visual Studio 2015, the implementation of `steady_clock` has change
2629
| [`duration` class](duration-class.md) | A time interval. |
2730
|[`duration_values` struct](duration-values-structure.md)|Provides specific values for the `duration` template parameter `Rep`.|
2831
| [`hh_mm_ss` class](hhmmss-class.md) | Splits a [`duration`](duration-class.md) into hours:minutes:seconds. |
29-
| [`last_spec`](last-spec-struct.md) | Used to indicate the last item in a sequence, such as the last day of the week, when creating a calendrical type. |
32+
| [`last_spec`](last-spec-struct.md) | Used to indicate the last item in a month such as last day of the week of a month (the last Tuesday of February 2020) or the last day of a month (the last day of April 2019). |
3033
| [`leap_second` class](leap-second-class.md) | A date and a value for an inserted leap second. |
3134
|[`leap_second_info` struct](leap-second-info-struct.md) | The data returned by [`get_leap_second_info`](chrono-functions.md#std-chrono-get-leap-second-info). |
3235
| [`month` class](month-class.md) | A month of a year. For example, July. |
@@ -49,21 +52,21 @@ Beginning in Visual Studio 2015, the implementation of `steady_clock` has change
4952

5053
| Name | Description |
5154
|--|--|
52-
|[`file_clock` class](file-clock-class.md)| A clock that is an alias for the clock used for `std::filesystem::file_time_type` used to express file timestamps.|
55+
|[`file_clock` class](file-clock-class.md)| An alias for the clock used for `std::filesystem::file_time_type`, which is used to express file timestamps.|
5356
|[`gps_clock` class](gps-clock-class.md)| A clock that keeps GPS time. Measures time starting from the first Sunday of January 1980 at 00:00:00 UTC.|
5457
|[`high_resolution_clock` struct](high-resolution-clock-struct.md)| A clock with a nanosecond tick period. |
55-
|[`local_t` struct](local_t.md)| A pseudo-clock used as an argument to the `time_point` template argument to indicate that the time_point represents local time. |
56-
|[`steady_clock` struct](steady-clock-struct.md)|A `steady` clock. Preferred for measuring time intervals. |
57-
|[`system_clock` struct](system-clock-structure.md)|A *`clock type`* that is based on the real-time clock of the system.|
58-
|[`tai_clock` class](tai-clock-class.md)| Measures International Atomic Time (TAI) starting from Thursday, January 1, 1958 at 00:00:00. Doesn't account for leap seconds.|
59-
|[`utc_clock` class](utc-clock-class.md)| Measures time since 00:00:00 UTC on Thursday, January 1, 1970. This clock accounts for leap seconds and is the time standard used around the world.|
58+
|[`local_t` struct](local_t.md)| A pseudo-clock used as an argument to the `time_point` template to indicate that the `time_point` represents local time. |
59+
|[`steady_clock` struct](steady-clock-struct.md)|A `steady` clock. This clock is preferred for measuring time intervals. |
60+
|[`system_clock` struct](system-clock-structure.md)|A clock based on the real-time clock of the system.|
61+
|[`tai_clock` class](tai-clock-class.md)| Measures International Atomic Time (TAI) starting from Thursday, January 1, 1958 at 00:00:00. This clock doesn't account for leap seconds.|
62+
|[`utc_clock` class](utc-clock-class.md)| Measures time since 00:00:00 UTC on Thursday, January 1, 1970. This clock accounts for leap seconds, and is the time standard used around the world.|
6063

6164
**Time Zones**
6265

6366
| Name | Description |
6467
|--|--|
6568
| [`time_zone` class](time-zone-class.md) | All time zone transitions for a specific geographic area. |
66-
| [`time_zone_link` class](time-zone-link-class.md) | Specifies an alternative name for a `time_zone`. |
69+
| [`time_zone_link` class](time-zone-link-class.md) | An alternative name for a `time_zone`. |
6770

6871
## Functions
6972

@@ -121,8 +124,8 @@ For more information about ratio types that are used in the following typedefs,
121124
| Name | Description |
122125
|--|--|
123126
| `typedef duration<long long, nano> nanoseconds;` | Synonym for a `duration` type that has a tick period of one billionth (1/1,000,000,000) of a second. |
124-
| `typedef duration<long long, micro> microseconds;` | Synonym for a `duration` type that has a tick period of one millionth (1/1,000,000) of a second. |
125-
| `typedef duration<long long, milli> milliseconds;` | Synonym for a `duration` type that has a tick period of one thousandth (1/1,000) of a second. |
127+
| `typedef duration<long long, micro> microseconds;` | Synonym for a `duration` type that has a tick period of one-millionth (1/1,000,000) of a second. |
128+
| `typedef duration<long long, milli> milliseconds;` | Synonym for a `duration` type that has a tick period of one-thousandth (1/1,000) of a second. |
126129
| `typedef duration<long long> seconds;` | Synonym for a `duration` type that has a tick period of 1 second. |
127130
| `typedef duration<int, ratio<60>> minutes;` | Synonym for a `duration` type that has a tick period of 1 minute. |
128131
| `typedef duration<int, ratio<3600>> hours;` | Synonym for a `duration` type that has a tick period of 1 hour. |
@@ -132,17 +135,17 @@ For more information about ratio types that are used in the following typedefs,
132135
| Name | Description |
133136
|--|--|
134137
| `file_time` | A synonym for `template <class Duration> using file_time = time_point<file_clock, Duration>`. Represents a [`time_point`](time-point-class.md) for a [`file_clock`](file-clock-class.md). You specify the `Duration`. |
135-
| `gps_seconds` | A synonym for `using gps_seconds = gps_time<seconds>;` A count of seconds, represented by a `time_point` that is associated with a [`gps_clock`](tai-clock-class.md). |
138+
| `gps_seconds` | A synonym for `gps_time<seconds>;` A count of seconds, represented by a `time_point` that is associated with a [`gps_clock`](tai-clock-class.md). |
136139
| `gps_time` | A synonym for `template <class Duration> using gps_time = time_point<gps_clock, Duration>`. Represents a `time_point` for a [`gps_clock`](gps-clock-class.md). You specify the `Duration`. |
137-
| `local_days` | A synonym for `using local_days = local_time<days>`. A count of days, represented by a [`time_point`](time-point-class.md) that isn't associated with any time zone. |
140+
| `local_days` | A synonym for `local_time<days>`. A count of days, represented by a [`time_point`](time-point-class.md) that isn't associated with any time zone. |
138141
| `local_seconds` | A synonym for `local_time<seconds>`. Defined in `std::chrono`. |
139-
| `local_time` | A synonym for `template <class Duration> using local_time = time_point<local_t, Duration>`. Represents a `time_point` for a local time. You specify the `Duration`. A `local_time` isn't associated with a time zone yet. It isn't the current local time of your computer's clock Only when you pair a `local_time` with a `time_zone` do you get a point in time that can be converted to UTC or other time in a specific time zone. |
140-
| `sys_days` | A synonym for `using sys_days = sys_time<days>`. A count of days, represented by a `time_point` that is associated with a [`system_clock`](system-clock-structure.md). |
141-
| `sys_seconds` | A synonym for `using sys_seconds = sys_time<seconds>`. A count of seconds, represented by a `time_point` that is associated with a [`system_clock`](system-clock-structure.md). |
142+
| `local_time` | A synonym for `template <class Duration> using local_time = time_point<local_t, Duration>`. Represents a `time_point` for a local time. You specify the `Duration`. A `local_time` isn't associated with a time zone yet. It isn't the current local time of your computer's clock. Only when you pair a `local_time` with a `time_zone` do you get a point in time that can be converted to UTC or other time in a specific time zone. |
143+
| `sys_days` | A synonym for `sys_time<days>`. A count of days, represented by a `time_point` that is associated with a [`system_clock`](system-clock-structure.md). |
144+
| `sys_seconds` | A synonym for `sys_time<seconds>`. A count of seconds, represented by a `time_point` that is associated with a [`system_clock`](system-clock-structure.md). |
142145
| `sys_time` | A synonym for `template <class Duration> using sys_time = time_point<system_clock, Duration>`. Represents a `time_point` for a [`system_clock`](system-clock-structure.md). You specify the `Duration`. |
143-
| `tai_seconds` | A synonym for `using tai_seconds = tai_time<seconds>` A count of seconds, represented by a `time_point` that is associated with a [`tai_clock`](tai-clock-class.md). |
146+
| `tai_seconds` | A synonym for `tai_time<seconds>` A count of seconds, represented by a `time_point` that is associated with a [`tai_clock`](tai-clock-class.md). |
144147
| `tai_time` | A synonym for `template <class Duration> using tai_time = time_point<tai_clock, Duration>`. Represents a `time_point` for a [`tai_clock`](tai-clock-class.md). You specify the `Duration`. |
145-
| `utc_seconds` | A synonym for `using utc_seconds = utc_time<seconds>;` |
148+
| `utc_seconds` | A synonym for `utc_time<seconds>;` |
146149
| `utc_time` | A synonym for `template<class Duration> using utc_time = time_point<utc_clock, Duration>`. Represents a `time_point`for a [`utc_clock`](utc-clock-class.md). You specify the `Duration`. |
147150

148151
## Type traits

docs/standard-library/last-spec-struct.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
---
22
description: "Learn more about: last_spec struct"
33
title: "last_spec struct"
4-
ms.date: 09/02/2021
4+
ms.date: 09/15/2021
55
f1_keywords: ["chrono/std::chrono::last_spec"]
66
---
77

88
# last_spec struct
99

10-
Indicates the last item in a sequence, such as the last Monday of December, the last day of the month, and so on.
10+
Used to indicate the last item in a month, such as last day of the week of a month (the last Tuesday of February 2020) or the last day of a month (the last day of April 2019).
1111

1212
## Syntax
1313

@@ -16,9 +16,12 @@ struct last_spec; // C++20
1616
inline constexpr last_spec last{} // C++20
1717
```
1818

19-
## Remarks
19+
## <a name="example"></a> Example: `last`
2020

21-
Use this struct when creating calendrical types to indicate the last item in a sequence. When you specify `last` while creating a calendrical type like `month_day_last`, you're passing a `last_spec` to indicate that you want the last day in the month. For example:
21+
Use `last_spec` to indicate the last item in a month. The following example uses `last` to indicate the:
22+
- last day in December as a `monthDayLast`
23+
- last Friday in July of 2021 as a `year_month_weekday_last`
24+
- last day in April of 1975 as a `year_month_day_last`
2225

2326
```cpp
2427
// compile using: /std:c++latest
@@ -35,13 +38,17 @@ int main()
3538
constexpr auto yearMonthWeekDayLast{year(2021)/July/Friday[last]}; // 'last' resolves to last_spec
3639
std::cout << yearMonthWeekDayLast << '\n';
3740

41+
constexpr auto yearMonthDayLast{ April / last / 1975 };
42+
std::cout << yearMonthDayLast << "\n";
43+
3844
return 0;
3945
}
4046
```
4147

4248
```output
4349
Dec/last
4450
2021/Jul/Fri[last]
51+
1975/Apr/last
4552
```
4653

4754
## Members
@@ -68,11 +75,11 @@ explicit last_spec() = default;
6875

6976
### Remarks
7077

71-
You typically won't create a `last_spec` instance directly. You'll use `last` as shown in the first example.
78+
You typically won't create a `last_spec` instance directly. You'll use `last` as shown above in [Example `last`](#example).
7279

7380
## See also
7481

7582
[`<chrono>`](chrono.md)\
7683
[`month_day_last` Class](month-day-last-class.md)\
7784
[`month_weekday_last` class](month-weekday-last-class.md)\
78-
[Header Files Reference](cpp-standard-library-header-files.md)
85+
[Header Files Reference](cpp-standard-library-header-files.md)

docs/standard-library/time-zone-link-class.md

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: "Learn more about: time_zone_link class"
33
title: "time_zone_link class"
4-
ms.date: 9/1/2021
4+
ms.date: 9/15/2021
55
f1_keywords: ["chrono/std::chrono::time_zone_link::name", "chrono/std::chrono::time_zone_link::target"]
66
helpviewer_keywords: ["std::chrono [C++], time_zone_link class", "std::chrono::time_zone_link::name function", "std::chrono::time_zone_link::target function"]
77
---
@@ -17,10 +17,17 @@ class time_zone_link; // Since C++20
1717

1818
## Remarks
1919

20-
`time_zone_link` instances are created when the time zone database is initialized. They can't be created by the developer. You can get them with `get_tzdb().links` as shown in the example at the end of this topic.
20+
`time_zone_link` instances are created when the time zone database is initialized. They can't be created directly. Get an instance via `get_tzdb().links`, as shown in the example at the end of this topic.
2121

2222
Although this type has a default move constructor and move assignment operator, it isn't copyable because only `const` access is provided to this type. Using those functions results in undefined behavior, which is why the move constructor and assignment operator aren't listed here.
2323

24+
**Differences with IANA database**
25+
26+
In Microsoft's implementation, time zone data can differ in some cases from the Internet Assigned Numbers Authority (IANA) time zone database. For example, `"America/Nuuk"` is returned instead of `"America/Godthab"` (`"America/Nuuk"` was renamed `"America/Godthab"` in April 2020). We don't supply the `"Eastern War Time EWT"` time zone at this time. See [Issue #1786](https://github.com/microsoft/STL/issues/1786) on the Microsoft STL GitHub repo for more details.
27+
28+
> [!NOTE]
29+
> At this time, time-zone data is only available on Windows version 19H1, and later. If you’re running on a version earlier than 19H1, you’ll get an exception: "The specified module could not be found".
30+
2431
## Members
2532

2633
### Public member functions and function templates

docs/windows/latest-supported-vc-redist.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Downloaded additional versions and languages from [Update for Visual C++ 2013 Re
5454
### Other versions
5555

5656
- [Multibyte MFC Library for Visual Studio 2013](https://my.visualstudio.com/Downloads?pid=1430). This add-on for Visual Studio 2013 contains the multibyte character set (MBCS) version of the Microsoft Foundation Class (MFC) Library.
57-
- [Visual C++ 2013 Runtime for Sideloaded Windows 8.1 apps](http://download.microsoft.com/download/5/f/0/5f0f8404-9329-44a9-8176-ed6f7f746f25/vclibs_redist_packages.zip). For more information, see [C++ Runtime for Sideloaded Windows 8.1 apps] on the [VC++ Team Blog](https://devblogs.microsoft.com/cppblog/c-runtime-for-sideloaded-windows-8-1-apps/).
57+
- [Visual C++ 2013 Runtime for Sideloaded Windows 8.1 apps](https://download.microsoft.com/download/5/f/0/5f0f8404-9329-44a9-8176-ed6f7f746f25/vclibs_redist_packages.zip). For more information, see [C++ Runtime for Sideloaded Windows 8.1 apps] on the [VC++ Team Blog](https://devblogs.microsoft.com/cppblog/c-runtime-for-sideloaded-windows-8-1-apps/).
5858

5959
## Visual Studio 2012 (VC++ 11.0) Update 4
6060

@@ -69,7 +69,7 @@ Download additional versions and languages from [Microsoft Visual C++ Redistribu
6969
## Visual Studio 2010 (VC++ 10.0) SP1 (no longer supported)
7070

7171
> [!NOTE]
72-
> Visual Studio 2010 Service Pack 1 [reached end of extended support on July 14, 2020](https://docs.microsoft.com/en-us/lifecycle/products/visual-studio-2010)
72+
> Visual Studio 2010 Service Pack 1 [reached end of extended support on July 14, 2020](/lifecycle/products/visual-studio-2010)
7373
7474
| Architecture | Version | Link |
7575
| ------------ | :----------: | ----------------------------------------------------------------------------------------------------------------------: |
@@ -84,7 +84,7 @@ Download additional languages from:
8484
## Visual Studio 2008 (VC++ 9.0) SP1 (no longer supported)
8585

8686
> [!NOTE]
87-
> Visual Studio 2008 Service Pack 1 [reached end of extended support on April 10, 2018](https://docs.microsoft.com/en-us/lifecycle/products/visual-studio-2008)
87+
> Visual Studio 2008 Service Pack 1 [reached end of extended support on April 10, 2018](/lifecycle/products/visual-studio-2008)
8888
8989
| Architecture | Version | Link |
9090
| ------------ | :------------: | ----------------------------------------------------------------------------------------------------------------------: |

0 commit comments

Comments
 (0)