mirror of
https://github.com/PixelGuys/Cubyz.git
synced 2025-08-03 03:06:55 -04:00
Update zig version to 0.12.0-dev.389+61b70778b and display debug times in µs instead of ns.
This commit is contained in:
parent
1a3a16c852
commit
1b2ed56e3c
@ -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,
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user