render: @panic() if CLOCK_MONOTONIC is not supported

Making this unreachable and invoking illegal behavior is incorrect.
This commit is contained in:
Isaac Freund 2021-06-27 13:20:36 +02:00
parent df492f83e6
commit 39578db134
No known key found for this signature in database
GPG key ID: 86DED400DDFD7A11

View file

@ -52,7 +52,7 @@ pub fn renderOutput(output: *Output) void {
const renderer = output.wlr_output.backend.getRenderer().?;
var now: os.timespec = undefined;
os.clock_gettime(os.CLOCK_MONOTONIC, &now) catch unreachable;
os.clock_gettime(os.CLOCK_MONOTONIC, &now) catch @panic("CLOCK_MONOTONIC not supported");
var needs_frame: bool = undefined;
var damage_region: pixman.Region32 = undefined;