defer on the last page to get accurate timings
This commit is contained in:
parent
4d0f58e5b0
commit
437fe17db0
33
main.odin
33
main.odin
@ -66,25 +66,22 @@ main :: proc() {
|
|||||||
|
|
||||||
switch trimmed_filename {
|
switch trimmed_filename {
|
||||||
case "index":
|
case "index":
|
||||||
buf: [1024]u8
|
defer {
|
||||||
date := time.now()
|
buf: [1024]u8
|
||||||
end := time.tick_since(start)
|
date := time.now()
|
||||||
|
end := time.tick_since(start)
|
||||||
os.write_string(file, "<br><footer><hr />This site was generated με αγάπη on ")
|
|
||||||
os.write_string(
|
|
||||||
file,
|
|
||||||
fmt.aprintf("%s ", time.to_string_dd_mm_yy(date, buf[:]), allocator = arena_alloc),
|
|
||||||
)
|
|
||||||
os.write_string(
|
|
||||||
file,
|
|
||||||
fmt.aprintf(
|
|
||||||
"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, "<br><footer><hr />This site was generated με αγάπη on ")
|
||||||
|
os.write_string(
|
||||||
|
file,
|
||||||
|
fmt.aprintf("%s ", time.to_string_dd_mm_yy(date, buf[:]), allocator = arena_alloc),
|
||||||
|
)
|
||||||
|
os.write_string(
|
||||||
|
file,
|
||||||
|
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