Thanks Tamas, however
macro time2(ex)
quote
println($(Meta.quot(ex)))
@time esc($(ex))
end
end
myfunc(n::Int) = sleep(0.00001*n)
@time2 (for n in 0:100 myfunc(n) end)
outputs
for n = 0:100 # long\path\...\myfunc.jl, line 15:
myFunc(n)
end
0.199292 seconds (612 allocations: 37.984 KB)
The problem here is the comment
# long\path\...\myfunc.jl, line 15:
which I do not want. How can I get rid of it?