mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
Allocators. Rename of "optenum" to fault. Memcpy and memset added. Cleanup of declaration use.
This commit is contained in:
committed by
Christoffer Lerno
parent
8743223dd6
commit
b99db4be24
@@ -1,13 +1,12 @@
|
||||
module test;
|
||||
import std::time;
|
||||
import std::io;
|
||||
|
||||
public macro timeit(#call)
|
||||
{
|
||||
Time t = time::current();
|
||||
typeof(#call) result = #call;
|
||||
TimeDiff diff = time::current() - t;
|
||||
io::printf("'%s' took %f ms\n", $stringify(#call), diff * 1000);
|
||||
libc::printf("'%s' took %f ms\n", $stringify(#call), diff * 1000);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user