Skip to content
Snippets Groups Projects
Verified Commit 00147dfd authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Simplify WR status flag extraction

parent 401ff19f
No related branches found
No related tags found
No related merge requests found
......@@ -93,8 +93,7 @@ struct UTCExtended
wr_status::Int
function UTCExtended(seconds, ns_cycles)
# TODO: make this more efficient
wr_status = (seconds & 0x80000000) == 0 ? 0 : 1 # most significant bit indicates White Rabbit status
wr_status = (seconds >> 31) & 1
s = seconds & 0x7FFFFFFF # skipping the most significant bit
new(s, ns_cycles * 16, wr_status)
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment