defer on the last page to get accurate timings

This commit is contained in:
Simon Kellet 2026-06-17 21:06:58 +01:00
parent 4d0f58e5b0
commit 437fe17db0

View File

@ -66,6 +66,7 @@ main :: proc() {
switch trimmed_filename {
case "index":
defer {
buf: [1024]u8
date := time.now()
end := time.tick_since(start)
@ -77,14 +78,10 @@ main :: proc() {
)
os.write_string(
file,
fmt.aprintf(
"in %v ",
time.duration_round(end, time.Nanosecond),
allocator = arena_alloc,
),
fmt.aprintf("in %v ", time.duration_round(end, time.Nanosecond), allocator = arena_alloc),
)
os.write_string(file, "<font color=#ea76cb><3</font> </footer><br>")
}
}
}