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 {
|
||||
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>")
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user