aboutsummaryrefslogtreecommitdiff
path: root/lib/std/debug.zig
diff options
context:
space:
mode:
authorTravis Martin <phasemage@live.com>2021-10-10 21:57:26 -0700
committerAndrew Kelley <andrew@ziglang.org>2021-12-09 18:34:17 -0700
commit72ee042ab0c6dc823f839bca6d1511a144f62b49 (patch)
tree1ff98cf9f458f97a897758441e9f64338e5e2220 /lib/std/debug.zig
parent01cb0bdb8317484cab0f8ee3896c981c851d3bb1 (diff)
downloadzig-72ee042ab0c6dc823f839bca6d1511a144f62b49.tar.gz
zig-72ee042ab0c6dc823f839bca6d1511a144f62b49.zip
Cache: fix two issues with isProblematicTimestamp
1. It was looking for trailing zero bits when it should be looking for trailing decimal zeros. 2. Clock timestamps had more precision than the actual file timestamps The fix is to grab a timestamp from a 'just now changed' temp file. This timestamp is "problematic". Any file timestamp greater than or equal to this timestamp is considered problematic. File timestamps **prior** to this **can** be trusted. Downside is that it causes a disk I/O to write to and then read the timestamp from this file ~1ms on my system. This is partially mitigated by keeping track of the most recent problematic timestamp, and only checking for a new problematic timestamp when checking a timestamp that is equal to or larger than the last problematic one. This fixes #6082.
Diffstat (limited to 'lib/std/debug.zig')
0 files changed, 0 insertions, 0 deletions