Next video: minimal timer library.
parent
506bd21d57
commit
45f3fa1860
|
@ -34,3 +34,9 @@
|
||||||
# Errors
|
# Errors
|
||||||
|
|
||||||
Double returning type => no need for specific return structures.
|
Double returning type => no need for specific return structures.
|
||||||
|
|
||||||
|
# Timer
|
||||||
|
|
||||||
|
const Timer = std.time.Timer;
|
||||||
|
var timer = try Timer.start();
|
||||||
|
var duration = timer.read() / 1000000; // ns -> ms
|
||||||
|
|
Reference in New Issue