mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 00:36:07 +03:00
timers for start times for later
This commit is contained in:
@ -40,6 +40,14 @@ pub const GlobalState = struct {
|
||||
|
||||
/// Initialize the global state.
|
||||
pub fn init(self: *GlobalState) !void {
|
||||
// const start = try std.time.Instant.now();
|
||||
// const start_micro = std.time.microTimestamp();
|
||||
// defer {
|
||||
// const end = std.time.Instant.now() catch unreachable;
|
||||
// // "[updateFrame critical time] <START us>\t<TIME_TAKEN us>"
|
||||
// std.log.err("[global init time] start={}us duration={}ns", .{ start_micro, end.since(start) / std.time.ns_per_us });
|
||||
// }
|
||||
|
||||
// Initialize ourself to nothing so we don't have any extra state.
|
||||
// IMPORTANT: this MUST be initialized before any log output because
|
||||
// the log function uses the global state.
|
||||
|
@ -20,6 +20,14 @@ pub fn init(gpa: Allocator) !void {
|
||||
// Not supported on Windows currently, doesn't build.
|
||||
if (comptime builtin.os.tag == .windows) return;
|
||||
|
||||
// const start = try std.time.Instant.now();
|
||||
// const start_micro = std.time.microTimestamp();
|
||||
// defer {
|
||||
// const end = std.time.Instant.now() catch unreachable;
|
||||
// // "[updateFrame critical time] <START us>\t<TIME_TAKEN us>"
|
||||
// std.log.err("[sentry init time] start={}us duration={}ns", .{ start_micro, end.since(start) / std.time.ns_per_us });
|
||||
// }
|
||||
|
||||
var arena = std.heap.ArenaAllocator.init(gpa);
|
||||
defer arena.deinit();
|
||||
const alloc = arena.allocator();
|
||||
|
Reference in New Issue
Block a user