defer on the last page to get accurate timings
This commit is contained in:
parent
4d0f58e5b0
commit
437fe17db0
@ -66,6 +66,7 @@ main :: proc() {
|
|||||||
|
|
||||||
switch trimmed_filename {
|
switch trimmed_filename {
|
||||||
case "index":
|
case "index":
|
||||||
|
defer {
|
||||||
buf: [1024]u8
|
buf: [1024]u8
|
||||||
date := time.now()
|
date := time.now()
|
||||||
end := time.tick_since(start)
|
end := time.tick_since(start)
|
||||||
@ -77,14 +78,10 @@ main :: proc() {
|
|||||||
)
|
)
|
||||||
os.write_string(
|
os.write_string(
|
||||||
file,
|
file,
|
||||||
fmt.aprintf(
|
fmt.aprintf("in %v ", time.duration_round(end, time.Nanosecond), allocator = arena_alloc),
|
||||||
"in %v ",
|
|
||||||
time.duration_round(end, time.Nanosecond),
|
|
||||||
allocator = arena_alloc,
|
|
||||||
),
|
|
||||||
)
|
)
|
||||||
os.write_string(file, "<font color=#ea76cb><3</font> </footer><br>")
|
os.write_string(file, "<font color=#ea76cb><3</font> </footer><br>")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user