Update zig version to 0.12.0-dev.389+61b70778b and display debug times in µs instead of ns.

This commit is contained in:
IntegratedQuantum 2023-09-16 20:21:02 +02:00
parent 1a3a16c852
commit 1b2ed56e3c
2 changed files with 2 additions and 4 deletions

View File

@ -81,8 +81,6 @@ pub fn build(b: *std.build.Builder) !void {
exe.addAnonymousModule("gui", .{.source_file = .{.path = "src/gui/gui.zig"}});
exe.addAnonymousModule("server", .{.source_file = .{.path = "src/server/server.zig"}});
@import("mach_freetype").brotli_import_path = "mach_freetype.freetype.brotli";
@import("mach_freetype").freetype_import_path = "mach_freetype.freetype";
const mach_freetype_dep = b.dependency("mach_freetype", .{
.target = target,
.optimize = optimize,

View File

@ -89,11 +89,11 @@ fn flawedRender() !void {
inline for(0..queryObjects[curBuffer].len) |i| {
var result: i64 = undefined;
c.glGetQueryObjecti64v(queryObjects[curBuffer][i], c.GL_QUERY_RESULT, &result);
try draw.print("{s}: {} ns", .{names[i], result}, 0, y, 8, .left);
try draw.print("{s}: {} µs", .{names[i], @divTrunc(result, 1000)}, 0, y, 8, .left);
sum += result;
y += 8;
}
try draw.print("Total: {} ns", .{sum}, 0, 0, 8, .left);
try draw.print("Total: {} µs", .{@divTrunc(sum, 1000)}, 0, 0, 8, .left);
}
pub fn render() Allocator.Error!void {