UndefVarError: tic not defined



I typed


in Julia, and got message:

UndefVarError: tic not defined

Am I missing any package here?


Did you want to use tic/toc à la Matlab? If so use

start = time()
elapsed = time() - start

Or use @time


When updating any old code to version 1.0+, it is always beneficial to run your code in version 0.7:

julia> tic()
┌ Warning: `tic()` is deprecated, use `@time`, `@elapsed`, or calls to `time_ns()` instead.
│   caller = top-level scope at none:0
└ @ Core none:0

The deprecation warning gives you the correct alternative(s) for your command.