<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><span class="vcard"><a class="email" href="mailto:ldionne@apple.com" title="Louis Dionne <ldionne@apple.com>"> <span class="fn">Louis Dionne</span></a>
</span> changed
<a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - steady_clock not advancing after system resumes"
href="https://bugs.llvm.org/show_bug.cgi?id=44773">bug 44773</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Status</td>
<td>NEW
</td>
<td>RESOLVED
</td>
</tr>
<tr>
<td style="text-align:right;">Fixed By Commit(s)</td>
<td>
</td>
<td>8bec8927134f116eb11ddea9db78b1a6241884c9
</td>
</tr>
<tr>
<td style="text-align:right;">Resolution</td>
<td>---
</td>
<td>FIXED
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - steady_clock not advancing after system resumes"
href="https://bugs.llvm.org/show_bug.cgi?id=44773#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_RESOLVED bz_closed"
title="RESOLVED FIXED - steady_clock not advancing after system resumes"
href="https://bugs.llvm.org/show_bug.cgi?id=44773">bug 44773</a>
from <span class="vcard"><a class="email" href="mailto:ldionne@apple.com" title="Louis Dionne <ldionne@apple.com>"> <span class="fn">Louis Dionne</span></a>
</span></b>
<pre>This was fixed with
commit 8bec8927134f116eb11ddea9db78b1a6241884c9
Author: Louis Dionne <<a href="mailto:ldionne@apple.com">ldionne@apple.com</a>>
Date: Mon Feb 10 18:30:43 2020 +0100
[libc++][Apple] Use CLOCK_MONOTONIC_RAW instead of CLOCK_UPTIME_RAW for
steady_clock
Summary:
In D27429, we switched the Apple implementation of steady_clock::now()
from clock_gettime(CLOCK_MONOTONIC) to clock_gettime(CLOCK_UPTIME_RAW).
The purpose was to get nanosecond precision, and also to improve the
performance of the implementation.
However, it appears that CLOCK_UPTIME_RAW does not satisfy the
requirements
of the Standard, since it is not strictly speaking monotonic. Indeed,
the
clock does not increment while the system is asleep, which had been
mentioned in D27429 but somehow not addressed.
This patch switches to CLOCK_MONOTONIC_RAW, which is monotonic,
increased
during sleep, and also has nanosecond precision.
<a href="https://llvm.org/PR44773">https://llvm.org/PR44773</a></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>