We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c1b4527 commit a4378a0Copy full SHA for a4378a0
1 file changed
port/stmicro/stm32/src/hals/common/systick.zig
@@ -79,16 +79,14 @@ pub fn get_time_since_boot() u64 {
79
while (true) {
80
const ticks = @as(u64, @intCast(reload - systick.VAL.read().CURRENT));
81
const high_after = microzig.cpu.atomic.load(u32, &accumulated_ticks, .acquire);
82
-
+
83
// ensure that 'high' and 'ticks' belong to the same
84
// RELOAD..0 count down cycle
85
if (high_before == high_after) {
86
const all_ticks = (@as(u64, high_after) << 24) | ticks;
87
const ns = all_ticks * ns_per_ticks;
88
return ns >> 10;
89
- }
90
- else
91
- {
+ } else {
92
high_before = high_after;
93
}
94
0 commit comments